test(molecule): load group files and allow override from platform_vars.yml

This commit is contained in:
NaeiKinDus 2024-01-06 00:00:00 +00:00
parent 19f509888a
commit 3a7440f570
Signed by: WoodSmellParticle
GPG key ID: 8E52ADFF7CA8AE56
3 changed files with 17 additions and 10 deletions

View file

@ -16,29 +16,36 @@
- name: Converge
hosts: molecule
gather_facts: true
vars_files:
- ../../../../../../../inventory/group_vars/all/vars.yml
- ../../../../../../../inventory/group_vars/all/vault.yml
- ./platform_vars.yml
tasks:
- include_vars: ../../../../../../../inventory/group_vars/all/vars.yml
- include_vars: ../../../../../../../inventory/group_vars/all/vault.yml
- include_vars: ./platform_vars.yml
- name: Enable guest console access
become: true
ansible.builtin.systemd_service:
name: serial-getty@ttyS0.service
enabled: true
state: restarted
- name: Testing common role
ansible.builtin.include_role:
name: nullified.infrastructure.common
tasks_from: main.yml
- name: Testing development role
ansible.builtin.include_role:
name: nullified.infrastructure.development
tasks_from: main.yml
- name: Testing security role
ansible.builtin.include_role:
name: nullified.infrastructure.security
tasks_from: main.yml
- name: Testing common role
ansible.builtin.include_role:
name: nullified.infrastructure.common
tasks_from: main.yml
- name: Testing server role
ansible.builtin.include_role:
name: nullified.infrastructure.server
tasks_from: main.yml
- name: Testing development role
ansible.builtin.include_role:
name: nullified.infrastructure.development
tasks_from: main.yml
- name: Testing workstation role
ansible.builtin.include_role:
name: nullified.infrastructure.workstation

View file

@ -35,5 +35,4 @@ provisioner:
name: ansible
inventory:
group_vars:
all:
custom_base_user_account: 'vagrant'
molecule:

View file

@ -0,0 +1 @@
custom_base_user_account: 'vagrant'