refctor: rework ci to ue ansible-lint and fix molecule
This commit is contained in:
parent
bf12336f1a
commit
23be96a70e
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"
|
|
@ -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"
|
||||||
|
|
||||||
|
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
|
@ -12,12 +12,12 @@ network_interfaces: {}
|
|||||||
# network_interfaces:
|
# network_interfaces:
|
||||||
# eth0:
|
# eth0:
|
||||||
# bootproto: none
|
# bootproto: none
|
||||||
# onboot: yes
|
# onboot: "yes"
|
||||||
# hwaddr: "aa:bb:cc:dd:ee"
|
# hwaddr: "aa:bb:cc:dd:ee"
|
||||||
# ipaddr: 192.168.0.5
|
# ipaddr: 192.168.0.5
|
||||||
# prefix: 26
|
# prefix: 26
|
||||||
# gateway: "192.168.0.1"
|
# gateway: "192.168.0.1"
|
||||||
# userctl: no
|
# userctl: "no"
|
||||||
# @end
|
# @end
|
||||||
|
|
||||||
network_routes: {}
|
network_routes: {}
|
||||||
|
@ -5,7 +5,8 @@
|
|||||||
listen: __network_host_reboot
|
listen: __network_host_reboot
|
||||||
|
|
||||||
- name: Restart network
|
- name: Restart network
|
||||||
ansible.builtin.shell: "{{ __network_restart_command }}"
|
ansible.builtin.shell: "{{ __network_restart_command }}" # noqa command-instead-of-shell
|
||||||
|
changed_when: False
|
||||||
async: 1
|
async: 1
|
||||||
poll: 0
|
poll: 0
|
||||||
when:
|
when:
|
||||||
@ -20,7 +21,7 @@
|
|||||||
msg: "Reboot triggered by Ansible"
|
msg: "Reboot triggered by Ansible"
|
||||||
async: 1
|
async: 1
|
||||||
poll: 0
|
poll: 0
|
||||||
ignore_errors: True
|
ignore_errors: True # noqa ignore-errors
|
||||||
when: network_reboot_enabled | bool
|
when: network_reboot_enabled | bool
|
||||||
listen: __network_host_reboot
|
listen: __network_host_reboot
|
||||||
|
|
||||||
|
@ -20,5 +20,3 @@ galaxy_info:
|
|||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- network
|
- network
|
||||||
dependencies: []
|
dependencies: []
|
||||||
collections:
|
|
||||||
- community.general
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.include_vars: "{{ var_files }}"
|
- name: Include OS specific vars
|
||||||
|
ansible.builtin.include_vars: "{{ var_files }}"
|
||||||
vars:
|
vars:
|
||||||
var_files: "{{ lookup('first_found', params, errors='ignore') }}"
|
var_files: "{{ lookup('first_found', params, errors='ignore') }}"
|
||||||
params:
|
params:
|
||||||
@ -11,6 +12,8 @@
|
|||||||
paths:
|
paths:
|
||||||
- "vars"
|
- "vars"
|
||||||
when: var_files
|
when: var_files
|
||||||
- ansible.builtin.include_tasks: nm.yml
|
- name: Configure NetworkManager
|
||||||
|
ansible.builtin.include_tasks: nm.yml
|
||||||
when: __network_nmcli | bool
|
when: __network_nmcli | bool
|
||||||
- ansible.builtin.include_tasks: setup.yml
|
- name: Configure network
|
||||||
|
ansible.builtin.include_tasks: setup.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user