fix(molecule): working again, added test for provisioner load_vars

This commit is contained in:
NaeiKinDus 2025-03-11 00:00:00 +00:00
parent 6707ece8e0
commit c6670c1c5f
Signed by: WoodSmellParticle
GPG key ID: 8E52ADFF7CA8AE56
8 changed files with 38 additions and 4 deletions

View file

@ -15,21 +15,45 @@
vars_files:
- ../../../../../../inventory/group_vars/all/vars.yml
- ../../../../../../inventory/group_vars/all/vault.yml
- ../../../../../../inventory/group_vars/provisioner/vars.yml
- ./platform_vars.yml
handlers:
- name: reboot vm
become: true
changed_when: false
ansible.builtin.reboot:
reboot_timeout: 10
tasks:
- include_vars: ../../../../../../inventory/group_vars/all/vars.yml
- include_vars: ../../../../../../inventory/group_vars/all/vault.yml
- include_vars: ../../../../../../inventory/group_vars/provisioner/vars.yml
- include_vars: ./platform_vars.yml
- name: Platform hostvars
ansible.builtin.debug:
msg: "{{ hostvars[inventory_hostname] }}"
verbosity: 1
- name: Upgrade system since vagrant boxes are often outdated
become: true
notify:
- reboot vm
ansible.builtin.apt:
update_cache: true
force_apt_get: true
cache_valid_time: 3600
autoremove: true
install_recommends: false
upgrade: full
- meta: flush_handlers
- name: Enable guest console access
become: true
ansible.builtin.systemd_service:
name: serial-getty@ttyS0.service
enabled: true
state: restarted
- name: Testing provisioner variables loading
ansible.builtin.include_role:
name: nullified.infrastructure.provisioner
tasks_from: load_facts.yml
- name: Testing security role
ansible.builtin.include_role:
name: nullified.infrastructure.security