feat(molecule): added switch to install or ignore faeture-only roles (e.g. workstation, deluge, ...) when running converge
This commit is contained in:
parent
1d2983c369
commit
ade0cea349
1 changed files with 19 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
# playbook file that contains the call for your role
|
|
||||||
- name: Fail if molecule group is missing
|
- name: Fail if molecule group is missing
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -8,10 +7,12 @@
|
||||||
that: "'molecule' in groups"
|
that: "'molecule' in groups"
|
||||||
fail_msg: |
|
fail_msg: |
|
||||||
molecule group was not found inside inventory groups: {{ groups }}
|
molecule group was not found inside inventory groups: {{ groups }}
|
||||||
|
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: molecule
|
hosts: molecule
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
|
vars:
|
||||||
|
bypass_reqs: false
|
||||||
|
bypass_misc: true
|
||||||
vars_files:
|
vars_files:
|
||||||
- ../../../../../../inventory/group_vars/all/vars.yml
|
- ../../../../../../inventory/group_vars/all/vars.yml
|
||||||
- ../../../../../../inventory/group_vars/all/vault.yml
|
- ../../../../../../inventory/group_vars/all/vault.yml
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
autoremove: true
|
autoremove: true
|
||||||
install_recommends: false
|
install_recommends: false
|
||||||
upgrade: full
|
upgrade: full
|
||||||
|
changed_when: false
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
- name: Enable guest console access
|
- name: Enable guest console access
|
||||||
become: true
|
become: true
|
||||||
|
@ -50,39 +52,54 @@
|
||||||
name: serial-getty@ttyS0.service
|
name: serial-getty@ttyS0.service
|
||||||
enabled: true
|
enabled: true
|
||||||
state: restarted
|
state: restarted
|
||||||
|
changed_when: false
|
||||||
- name: Testing provisioner variables loading
|
- name: Testing provisioner variables loading
|
||||||
|
when: bypass_reqs is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.provisioner
|
name: nullified.infrastructure.provisioner
|
||||||
tasks_from: load_facts.yml
|
tasks_from: load_facts.yml
|
||||||
- name: Testing security role
|
- name: Testing security role
|
||||||
|
when: bypass_reqs is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.security
|
name: nullified.infrastructure.security
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
- name: Testing common role
|
- name: Testing common role
|
||||||
|
when: bypass_reqs is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.common
|
name: nullified.infrastructure.common
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
- name: Testing server role
|
- name: Testing server role
|
||||||
|
when: bypass_reqs is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.server
|
name: nullified.infrastructure.server
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
- name: Testing development role
|
- name: Testing development role
|
||||||
|
when: bypass_misc is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.development
|
name: nullified.infrastructure.development
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
- name: Testing workstation role
|
- name: Testing workstation role
|
||||||
|
when: bypass_misc is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.workstation
|
name: nullified.infrastructure.workstation
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
- name: Testing gaming role
|
- name: Testing gaming role
|
||||||
|
when: bypass_misc is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.gaming
|
name: nullified.infrastructure.gaming
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
- name: Testing deluge role
|
- name: Testing deluge role
|
||||||
|
when: bypass_misc is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.deluge
|
name: nullified.infrastructure.deluge
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
|
- name: Testing nginx role
|
||||||
|
when: bypass_reqs is falsy
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: nullified.infrastructure.nginx
|
||||||
|
tasks_from: main.yml
|
||||||
- name: Testing valkey role
|
- name: Testing valkey role
|
||||||
|
when: bypass_reqs is falsy
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nullified.infrastructure.valkey
|
name: nullified.infrastructure.valkey
|
||||||
tasks_from: main.yml
|
tasks_from: main.yml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue