refctor: rework ci to ue ansible-lint and fix molecule
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-08-19 16:06:06 +02:00
parent 86268811e6
commit 9350ea121e
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
10 changed files with 41 additions and 37 deletions

View File

@ -1,15 +0,0 @@
---
ansible:
custom_modules:
- iptables_raw
- openssl_pkcs12
- proxmox_kvm
- ucr
- corenetworks_dns
- corenetworks_token
rules:
exclude_files:
- "LICENSE*"
- "**/*.md"
- "**/*.ini"

View File

@ -9,11 +9,11 @@ steps:
- name: generate
image: quay.io/thegeeklab/ansible-doctor
environment:
ANSIBLE_DOCTOR_EXCLUDE_FILES: molecule/
ANSIBLE_DOCTOR_FORCE_OVERWRITE: "true"
ANSIBLE_DOCTOR_LOG_LEVEL: INFO
ANSIBLE_DOCTOR_ROLE_NAME: ${CI_REPO_NAME}
ANSIBLE_DOCTOR_TEMPLATE: readme
ANSIBLE_DOCTOR_EXCLUDE_FILES: "['molecule/']"
ANSIBLE_DOCTOR_RENDERER__FORCE_OVERWRITE: "true"
ANSIBLE_DOCTOR_LOGGING__LEVEL: info
ANSIBLE_DOCTOR_ROLE__NAME: ${CI_REPO_NAME}
ANSIBLE_DOCTOR_TEMPLATE__NAME: readme
- name: format
image: quay.io/thegeeklab/alpine-tools

View File

@ -6,10 +6,10 @@ when:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: ansible-later
image: quay.io/thegeeklab/ansible-later:4
- name: ansible-lint
image: quay.io/thegeeklab/ansible-dev-tools:1
commands:
- ansible-later
- ansible-lint
environment:
FORCE_COLOR: "1"

View File

@ -7,7 +7,7 @@ when:
variables:
- &molecule_base
image: quay.io/thegeeklab/molecule:6
image: quay.io/thegeeklab/ansible-dev-tools:1
group: molecule
environment:
PY_COLORS: "1"

20
.yamllint Normal file
View File

@ -0,0 +1,20 @@
---
extends: default
rules:
truthy:
allowed-values: ["True", "False"]
comments:
min-spaces-from-content: 1
comments-indentation: False
line-length: disable
braces:
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
indentation: enable
octal-values:
forbid-implicit-octal: True
forbid-explicit-octal: True

View File

@ -12,15 +12,12 @@ galaxy_info:
# @end
description: Configure a list of LVM volumes
license: MIT
min_ansible_version: 2.10
min_ansible_version: "2.10"
platforms:
- name: EL
versions:
- 7
- 8
- "9"
galaxy_tags:
- storage
- lvm
dependencies: []
collections:
- community.general

View File

@ -4,11 +4,11 @@ driver:
dependency:
name: galaxy
options:
role-file: molecule/requirements.yml
requirements-file: molecule/requirements.yml
role-file: requirements.yml
requirements-file: requirements.yml
platforms:
- name: "rocky9-lvm"
server_type: "CX22"
server_type: "cx22"
image: "rocky-9"
volumes:
- name: volume-1

View File

@ -1,4 +0,0 @@
---
collections: []
roles: []

6
requirements.yml Normal file
View File

@ -0,0 +1,6 @@
---
collections:
- name: community.general
- name: ansible.posix
roles: []

View File

@ -10,7 +10,7 @@
vg: "{{ item.group }}"
pvs: "{{ item.disks | join(',') }}"
pesize: "4"
pvresize: yes
pvresize: True
loop: "{{ lvm_volumes }}"
loop_control:
label: "name: {{ item.group }}, disks: {{ item.disks | join(',') }}"