diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-08-11 00:33:29 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-08-11 00:33:29 +0200 |
| commit | 3cc7bb4b415e758786ed04d3b506031cd9f1971b (patch) | |
| tree | 2e60192ae61fca19022d9e1b3075edf75e06fe61 /molecule/default | |
| parent | aeaa724705363ca104ab4770d844e396795af3ea (diff) | |
Add the bootstrap role to install archlinux w/testing
Diffstat (limited to 'molecule/default')
| -rw-r--r-- | molecule/default/converge.yml | 3 | ||||
| -rw-r--r-- | molecule/default/prepare.yml | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 0a26ebd..b4ea57f 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -3,6 +3,7 @@ hosts: instance gather_facts: true vars: + hostname: "{{ test_hostname }}" partition_wipe: false partition_disk: "{{ test_device }}" partition_boot: @@ -39,6 +40,8 @@ - name: "Get test facts" ansible.builtin.set_fact: test_device: "{{ hostvars['localhost']['test_device'] }}" + test_hostname: "{{ hostvars['localhost']['test_hostname'] }}" roles: - role: partition + - role: bootstrap diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index b9f84a7..371f7c3 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -3,6 +3,11 @@ hosts: localhost gather_facts: true tasks: + - name: "Set distro test host name mapping" + ansible.builtin.set_fact: + distro_hostname_mapping: + archlinux: "archlinux.local" + - name: "Create virtual disk image" become: true community.general.filesize: @@ -21,6 +26,7 @@ - name: "Set test facts" ansible.builtin.set_fact: test_device: "{{ loop_device.stdout }}" + test_hostname: "{{ distro_hostname_mapping[lookup('ansible.builtin.env', 'MOLECULE_DISTRO')] }}" cacheable: true - name: "Show test info" @@ -29,3 +35,5 @@ with_items: - name: "Test Device" value: "{{ test_device }}" + - name: "Test Hostname;" + value: "{{ test_hostname }}" |
