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
|
||||
hosts: localhost
|
||||
tasks:
|
||||
|
@ -8,10 +7,12 @@
|
|||
that: "'molecule' in groups"
|
||||
fail_msg: |
|
||||
molecule group was not found inside inventory groups: {{ groups }}
|
||||
|
||||
- name: Converge
|
||||
hosts: molecule
|
||||
gather_facts: true
|
||||
vars:
|
||||
bypass_reqs: false
|
||||
bypass_misc: true
|
||||
vars_files:
|
||||
- ../../../../../../inventory/group_vars/all/vars.yml
|
||||
- ../../../../../../inventory/group_vars/all/vault.yml
|
||||
|
@ -43,6 +44,7 @@
|
|||
autoremove: true
|
||||
install_recommends: false
|
||||
upgrade: full
|
||||
changed_when: false
|
||||
- meta: flush_handlers
|
||||
- name: Enable guest console access
|
||||
become: true
|
||||
|
@ -50,39 +52,54 @@
|
|||
name: serial-getty@ttyS0.service
|
||||
enabled: true
|
||||
state: restarted
|
||||
changed_when: false
|
||||
- name: Testing provisioner variables loading
|
||||
when: bypass_reqs is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.provisioner
|
||||
tasks_from: load_facts.yml
|
||||
- name: Testing security role
|
||||
when: bypass_reqs is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.security
|
||||
tasks_from: main.yml
|
||||
- name: Testing common role
|
||||
when: bypass_reqs is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.common
|
||||
tasks_from: main.yml
|
||||
- name: Testing server role
|
||||
when: bypass_reqs is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.server
|
||||
tasks_from: main.yml
|
||||
- name: Testing development role
|
||||
when: bypass_misc is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.development
|
||||
tasks_from: main.yml
|
||||
- name: Testing workstation role
|
||||
when: bypass_misc is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.workstation
|
||||
tasks_from: main.yml
|
||||
- name: Testing gaming role
|
||||
when: bypass_misc is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.gaming
|
||||
tasks_from: main.yml
|
||||
- name: Testing deluge role
|
||||
when: bypass_misc is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.deluge
|
||||
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
|
||||
when: bypass_reqs is falsy
|
||||
ansible.builtin.include_role:
|
||||
name: nullified.infrastructure.valkey
|
||||
tasks_from: main.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue