Normalize user-facing defaults
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
- name: Abort if the host is not booted from the Arch install media
|
||||
when:
|
||||
- not (custom_iso | default(false) | bool)
|
||||
- not (custom_iso | bool)
|
||||
- not environment_archiso_stat.stat.exists
|
||||
ansible.builtin.fail:
|
||||
msg: This host is not booted from the Arch install media!
|
||||
@@ -40,10 +40,9 @@
|
||||
- name: Set IP-Address
|
||||
when:
|
||||
- hypervisor == "vmware"
|
||||
- vm_ip is defined
|
||||
- vm_ip | length
|
||||
- vm_ip | length > 0
|
||||
ansible.builtin.command: >-
|
||||
ip addr replace {{ vm_ip }}/{{ vm_nms | default(24) }}
|
||||
ip addr replace {{ vm_ip }}/{{ vm_nms }}
|
||||
dev {{ environment_interface_name }}
|
||||
register: environment_ip_result
|
||||
changed_when: environment_ip_result.rc == 0
|
||||
@@ -51,10 +50,8 @@
|
||||
- name: Set Default Gateway
|
||||
when:
|
||||
- hypervisor == "vmware"
|
||||
- vm_gw is defined
|
||||
- vm_gw | length
|
||||
- vm_ip is defined
|
||||
- vm_ip | length
|
||||
- vm_gw | length > 0
|
||||
- vm_ip | length > 0
|
||||
ansible.builtin.command: "ip route replace default via {{ vm_gw }}"
|
||||
register: environment_gateway_result
|
||||
changed_when: environment_gateway_result.rc == 0
|
||||
@@ -65,7 +62,7 @@
|
||||
changed_when: false
|
||||
|
||||
- name: Configure SSH for root login
|
||||
when: hypervisor == "vmware" and (vmware_ssh is defined and vmware_ssh | bool)
|
||||
when: hypervisor == "vmware" and (vmware_ssh | bool)
|
||||
block:
|
||||
- name: Allow login
|
||||
ansible.builtin.replace:
|
||||
@@ -91,14 +88,14 @@
|
||||
- name: Prepare installer environment
|
||||
block:
|
||||
- name: Speed-up Bootstrap process
|
||||
when: not (custom_iso | default(false) | bool)
|
||||
when: not (custom_iso | bool)
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pacman.conf
|
||||
regexp: ^#ParallelDownloads =
|
||||
line: ParallelDownloads = 20
|
||||
|
||||
- name: Wait for pacman lock to be released
|
||||
when: not (custom_iso | default(false) | bool)
|
||||
when: not (custom_iso | bool)
|
||||
ansible.builtin.wait_for:
|
||||
path: /var/lib/pacman/db.lck
|
||||
state: absent
|
||||
@@ -107,7 +104,7 @@
|
||||
|
||||
- name: Setup Pacman
|
||||
when:
|
||||
- not (custom_iso | default(false) | bool)
|
||||
- not (custom_iso | bool)
|
||||
- "'os' not in item or os in item.os"
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
@@ -141,7 +138,7 @@
|
||||
state: mounted
|
||||
|
||||
- name: Configure RHEL Repos for installation
|
||||
when: is_rhel | default(false)
|
||||
when: is_rhel | bool
|
||||
block:
|
||||
- name: Create directories for repository files and RPM GPG keys
|
||||
ansible.builtin.file:
|
||||
|
||||
Reference in New Issue
Block a user