Compare commits
4 Commits
4fff9f8d80
...
41ccf2a5b9
| Author | SHA1 | Date | |
|---|---|---|---|
| 41ccf2a5b9 | |||
| 8f9cfe3b2f | |||
| 6a75237197 | |||
| b04aad12fb |
@@ -21,8 +21,15 @@
|
||||
failed_when: false
|
||||
no_log: true
|
||||
|
||||
- name: Start the VM
|
||||
- name: Ensure the installer environment is powered off
|
||||
community.proxmox.proxmox_kvm:
|
||||
vmid: "{{ system_cfg.id }}"
|
||||
state: restarted
|
||||
state: stopped
|
||||
force: true
|
||||
no_log: true
|
||||
|
||||
- name: Boot the installed OS
|
||||
community.proxmox.proxmox_kvm:
|
||||
vmid: "{{ system_cfg.id }}"
|
||||
state: started
|
||||
no_log: true
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
org_id: "{{ system_cfg.content.satellite.org }}"
|
||||
activationkey: "{{ system_cfg.content.satellite.activation_key }}"
|
||||
environment: "{{ system_cfg.content.satellite.environment | default(omit, true) }}"
|
||||
auto_attach: true
|
||||
force_register: true
|
||||
server_proxy_hostname: "{{ (system_cfg.content.proxy | urlsplit('hostname')) | default(omit, true) }}"
|
||||
server_proxy_port: "{{ (system_cfg.content.proxy | urlsplit('port')) | default(omit, true) }}"
|
||||
|
||||
@@ -54,6 +54,18 @@
|
||||
and 'No such file or directory' not in (configuration_enable_service_result.stderr | default(''))
|
||||
and 'does not exist' not in (configuration_enable_service_result.stderr | default(''))
|
||||
|
||||
- name: Check for the EL qemu-guest-agent RPC allow-list
|
||||
ansible.builtin.stat:
|
||||
path: /mnt/etc/sysconfig/qemu-ga
|
||||
register: configuration_qga_sysconfig
|
||||
|
||||
- name: Allow clone-stamping RPCs in the EL qemu-guest-agent allow-list
|
||||
when: configuration_qga_sysconfig.stat.exists
|
||||
ansible.builtin.replace:
|
||||
path: /mnt/etc/sysconfig/qemu-ga
|
||||
regexp: '^(FILTER_RPC_ARGS="--allow-rpcs=(?:(?!guest-exec)[^"])*)"'
|
||||
replace: '\1,guest-exec,guest-exec-status,guest-file-open,guest-file-close,guest-file-read,guest-file-write"'
|
||||
|
||||
- name: Enable display manager for selected desktop
|
||||
when:
|
||||
- _configuration_platform.init_system == 'systemd'
|
||||
|
||||
@@ -73,28 +73,25 @@
|
||||
mode: "0755"
|
||||
|
||||
- name: Detect RHEL ISO device
|
||||
ansible.builtin.command: lsblk -rno NAME,TYPE
|
||||
ansible.builtin.command: lsblk -rbno NAME,TYPE,SIZE
|
||||
register: environment_lsblk_result
|
||||
changed_when: false
|
||||
|
||||
- name: Select RHEL ISO device
|
||||
vars:
|
||||
_rom_devices: >-
|
||||
{{
|
||||
environment_lsblk_result.stdout_lines
|
||||
| map('split', ' ')
|
||||
| selectattr('1', 'equalto', 'rom')
|
||||
| map('first')
|
||||
| map('regex_replace', '^', '/dev/')
|
||||
| list
|
||||
}}
|
||||
_roms: >-
|
||||
{%- set out = [] -%}
|
||||
{%- for line in environment_lsblk_result.stdout_lines -%}
|
||||
{%- set p = line.split() -%}
|
||||
{%- if (p | length) >= 3 and p[1] == 'rom' -%}
|
||||
{%- set _ = out.append({'name': p[0], 'size': p[2] | int}) -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{{ out }}
|
||||
ansible.builtin.set_fact:
|
||||
environment_rhel_iso_device: >-
|
||||
{{
|
||||
_rom_devices[-1]
|
||||
if _rom_devices | length > 1
|
||||
else (_rom_devices[0] | default('/dev/sr1'))
|
||||
}}
|
||||
{{ ('/dev/' ~ (_roms | sort(attribute='size') | last).name)
|
||||
if (_roms | length) > 0 else '/dev/sr1' }}
|
||||
|
||||
- name: Mount RHEL ISO
|
||||
ansible.posix.mount:
|
||||
|
||||
Reference in New Issue
Block a user