refctor: rework ci to ue ansible-lint and fix molecule
This commit is contained in:
parent
7785169158
commit
dbcf798b1b
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: ghcr.io/ansible/community-ansible-dev-tools
|
||||||
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"
|
||||||
|
@ -22,5 +22,3 @@ galaxy_info:
|
|||||||
- cacerts
|
- cacerts
|
||||||
- corporate
|
- corporate
|
||||||
dependencies: []
|
dependencies: []
|
||||||
collections:
|
|
||||||
- community.general
|
|
||||||
|
@ -8,7 +8,7 @@ dependency:
|
|||||||
requirements-file: molecule/requirements.yml
|
requirements-file: molecule/requirements.yml
|
||||||
platforms:
|
platforms:
|
||||||
- name: "rocky9-cacerts"
|
- name: "rocky9-cacerts"
|
||||||
server_type: "CX22"
|
server_type: "cx22"
|
||||||
image: "rocky-9"
|
image: "rocky-9"
|
||||||
provisioner:
|
provisioner:
|
||||||
name: ansible
|
name: ansible
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install required packages
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: present
|
|
||||||
loop: "{{ cacerts_packages_extra + cacerts_packages }}"
|
|
||||||
|
|
||||||
- name: Ensure ca path at '{{ __cacerts_ca_trust_source }}' exists
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ __cacerts_ca_trust_source }}"
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
|
|
||||||
- name: Install custom ca certs
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: "{{ item.path }}"
|
|
||||||
dest: "{{ __cacerts_ca_trust_source }}/{{ item.name }}"
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0640"
|
|
||||||
register: __ca_add
|
|
||||||
loop: "{{ cacerts_ca_certs }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.name }}"
|
|
||||||
|
|
||||||
- name: Update cert index
|
|
||||||
ansible.builtin.command: "{{ __cacerts_ca_update_command }}"
|
|
||||||
changed_when: __ca_add.changed
|
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
- name: Include OS specific vars
|
||||||
|
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||||
vars:
|
vars:
|
||||||
params:
|
params:
|
||||||
files:
|
files:
|
||||||
@ -9,4 +10,30 @@
|
|||||||
- "vars"
|
- "vars"
|
||||||
errors: "ignore"
|
errors: "ignore"
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: cacerts.yml
|
- name: Install required packages
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop: "{{ cacerts_packages_extra + cacerts_packages }}"
|
||||||
|
|
||||||
|
- name: Ensure ca path exists '{{ __cacerts_ca_trust_source }}'
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ __cacerts_ca_trust_source }}"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Install custom ca certs
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.path }}"
|
||||||
|
dest: "{{ __cacerts_ca_trust_source }}/{{ item.name }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0640"
|
||||||
|
register: __ca_add
|
||||||
|
loop: "{{ cacerts_ca_certs }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
|
- name: Update cert index
|
||||||
|
ansible.builtin.command: "{{ __cacerts_ca_update_command }}"
|
||||||
|
changed_when: __ca_add.changed
|
||||||
|
Loading…
Reference in New Issue
Block a user