refctor: rework ci to ue ansible-lint and fix molecule
This commit is contained in:
parent
6f5599dd2f
commit
d55fc84fe9
15
.later.yml
15
.later.yml
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
ansible:
|
|
||||||
custom_modules:
|
|
||||||
- iptables_raw
|
|
||||||
- openssl_pkcs12
|
|
||||||
- proxmox_kvm
|
|
||||||
- ucr
|
|
||||||
- corenetworks_dns
|
|
||||||
- corenetworks_token
|
|
||||||
|
|
||||||
rules:
|
|
||||||
exclude_files:
|
|
||||||
- "LICENSE*"
|
|
||||||
- "**/*.md"
|
|
||||||
- "**/*.ini"
|
|
@ -9,11 +9,11 @@ steps:
|
|||||||
- name: generate
|
- name: generate
|
||||||
image: quay.io/thegeeklab/ansible-doctor
|
image: quay.io/thegeeklab/ansible-doctor
|
||||||
environment:
|
environment:
|
||||||
ANSIBLE_DOCTOR_EXCLUDE_FILES: molecule/
|
ANSIBLE_DOCTOR_EXCLUDE_FILES: "['molecule/']"
|
||||||
ANSIBLE_DOCTOR_FORCE_OVERWRITE: "true"
|
ANSIBLE_DOCTOR_RENDERER__FORCE_OVERWRITE: "true"
|
||||||
ANSIBLE_DOCTOR_LOG_LEVEL: INFO
|
ANSIBLE_DOCTOR_LOGGING__LEVEL: info
|
||||||
ANSIBLE_DOCTOR_ROLE_NAME: ${CI_REPO_NAME}
|
ANSIBLE_DOCTOR_ROLE__NAME: ${CI_REPO_NAME}
|
||||||
ANSIBLE_DOCTOR_TEMPLATE: readme
|
ANSIBLE_DOCTOR_TEMPLATE__NAME: readme
|
||||||
|
|
||||||
- name: format
|
- name: format
|
||||||
image: quay.io/thegeeklab/alpine-tools
|
image: quay.io/thegeeklab/alpine-tools
|
||||||
|
@ -6,10 +6,10 @@ when:
|
|||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
- ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ansible-later
|
- name: ansible-lint
|
||||||
image: quay.io/thegeeklab/ansible-later:4
|
image: quay.io/thegeeklab/ansible-dev-tools:1
|
||||||
commands:
|
commands:
|
||||||
- ansible-later
|
- ansible-lint
|
||||||
environment:
|
environment:
|
||||||
FORCE_COLOR: "1"
|
FORCE_COLOR: "1"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ when:
|
|||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &molecule_base
|
- &molecule_base
|
||||||
image: quay.io/thegeeklab/molecule:6
|
image: quay.io/thegeeklab/ansible-dev-tools:1
|
||||||
group: molecule
|
group: molecule
|
||||||
environment:
|
environment:
|
||||||
PY_COLORS: "1"
|
PY_COLORS: "1"
|
||||||
|
20
.yamllint
Normal file
20
.yamllint
Normal 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
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
- name: Restart dnsmasq Service
|
- name: Restart dnsmasq Service
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: dnsmasq
|
name: dnsmasq
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: yes
|
daemon_reload: True
|
||||||
enabled: yes
|
enabled: True
|
||||||
listen: __dnsmasq_restart
|
listen: __dnsmasq_restart
|
||||||
|
@ -21,5 +21,3 @@ galaxy_info:
|
|||||||
- dns
|
- dns
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
dependencies: []
|
dependencies: []
|
||||||
collections:
|
|
||||||
- community.general
|
|
||||||
|
@ -8,7 +8,7 @@ dependency:
|
|||||||
requirements-file: molecule/requirements.yml
|
requirements-file: molecule/requirements.yml
|
||||||
platforms:
|
platforms:
|
||||||
- name: "rocky9-dnsmasq"
|
- name: "rocky9-dnsmasq"
|
||||||
server_type: "CX22"
|
server_type: "cx22"
|
||||||
image: "rocky-9"
|
image: "rocky-9"
|
||||||
provisioner:
|
provisioner:
|
||||||
name: ansible
|
name: ansible
|
||||||
|
@ -9,3 +9,7 @@
|
|||||||
((test -e /usr/bin/apt && (apt -y update && apt install -y python-minimal)) ||
|
((test -e /usr/bin/apt && (apt -y update && apt install -y python-minimal)) ||
|
||||||
echo "Warning: Python not boostrapped due to unknown platform.")
|
echo "Warning: Python not boostrapped due to unknown platform.")
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
retries: 3
|
||||||
|
delay: 5
|
||||||
|
register: __bootstrap_python
|
||||||
|
until: __bootstrap_python.rc == 0
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
---
|
---
|
||||||
- name: Install package
|
- name: Install package
|
||||||
package:
|
ansible.builtin.package:
|
||||||
name: dnsmasq
|
name: dnsmasq
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create dnsmasq configuration
|
- name: Create dnsmasq configuration
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ dnsmasq_conf }}"
|
content: "{{ dnsmasq_conf }}"
|
||||||
dest: "/etc/dnsmasq.d/local.conf"
|
dest: "/etc/dnsmasq.d/local.conf"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify: __dnsmasq_restart
|
notify: __dnsmasq_restart
|
||||||
|
|
||||||
- name: Ensure dnsmasq is up and running
|
- name: Ensure dnsmasq is up and running
|
||||||
service:
|
ansible.builtin.service:
|
||||||
name: dnsmasq
|
name: dnsmasq
|
||||||
enabled: True
|
enabled: True
|
||||||
state: started
|
state: started
|
||||||
|
Loading…
Reference in New Issue
Block a user