From 3cc7bb4b415e758786ed04d3b506031cd9f1971b Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 11 Aug 2025 00:33:29 +0200 Subject: Add the bootstrap role to install archlinux w/testing --- molecule/default/converge.yml | 3 +++ molecule/default/prepare.yml | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'molecule/default') 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 }}" -- cgit v1.2.3