fix(bootstrap): RHEL 9 bootstrap from Arch ISO compatibility
This commit is contained in:
@@ -9,12 +9,21 @@
|
||||
groupinstall -y core base standard
|
||||
register: bootstrap_result
|
||||
changed_when: bootstrap_result.rc == 0
|
||||
failed_when:
|
||||
- bootstrap_result.rc != 0
|
||||
- "'grub2-common' not in (bootstrap_result.stderr | default(''))"
|
||||
|
||||
- name: Ensure chroot has resolv.conf
|
||||
ansible.builtin.file:
|
||||
src: /run/NetworkManager/resolv.conf
|
||||
- name: Write resolv.conf into chroot
|
||||
ansible.builtin.copy:
|
||||
dest: /mnt/etc/resolv.conf
|
||||
state: link
|
||||
mode: "0644"
|
||||
content: |
|
||||
{% for dns in system_cfg.network.dns.servers %}
|
||||
nameserver {{ dns }}
|
||||
{% endfor %}
|
||||
{% if system_cfg.network.dns.search | default([]) | length > 0 %}
|
||||
search {{ system_cfg.network.dns.search | join(' ') }}
|
||||
{% endif %}
|
||||
|
||||
- name: Ensure chroot RHEL DVD directory exists
|
||||
ansible.builtin.file:
|
||||
|
||||
Reference in New Issue
Block a user