From 14e8869c822b1336587114fc9c3a49cb9d4d7df0 Mon Sep 17 00:00:00 2001 From: William Graef Date: Tue, 28 Jan 2025 10:55:35 -0500 Subject: [PATCH 1/3] add retry for dnf and key_by for oci instance --- ol/build.yml | 1 + ol/provision_kvm.yml | 4 ++++ ol/provision_podman.yml | 4 ++++ ol/provision_vbox.yml | 6 ++++++ ol/provision_vnc.yml | 4 ++++ ol/update_all_rpms.yml | 2 ++ 6 files changed, 21 insertions(+) diff --git a/ol/build.yml b/ol/build.yml index 410f528..7d4799a 100644 --- a/ol/build.yml +++ b/ol/build.yml @@ -31,6 +31,7 @@ - name: "OS Management Service Agent" desired_state: DISABLED + key_by: [compartment_id, availability_domain, display_name] register: result vars: timestamp: "{{ now().strftime('%Y%m%d-%H%M%S') }}" diff --git a/ol/provision_kvm.yml b/ol/provision_kvm.yml index 460e10a..cbe5fdf 100644 --- a/ol/provision_kvm.yml +++ b/ol/provision_kvm.yml @@ -23,6 +23,8 @@ - cockpit-machines state: present when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8' + retries: 5 + delay: 10 - name: Install Oracle Linux 9 virtualization packages ansible.builtin.dnf: @@ -36,6 +38,8 @@ - cockpit-machines state: present when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9' + retries: 5 + delay: 10 - name: Start and enable Oracle Linux 8 monolithic virtualization services ansible.builtin.systemd: diff --git a/ol/provision_podman.yml b/ol/provision_podman.yml index c35616d..66cf3cf 100644 --- a/ol/provision_podman.yml +++ b/ol/provision_podman.yml @@ -20,6 +20,8 @@ - curl state: present when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8' + retries: 5 + delay: 10 - name: Install Oracle Linux 9 container tools packages ansible.builtin.dnf: @@ -30,3 +32,5 @@ - curl state: present when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9' + retries: 5 + delay: 10 diff --git a/ol/provision_vbox.yml b/ol/provision_vbox.yml index ce0354a..c95d46d 100644 --- a/ol/provision_vbox.yml +++ b/ol/provision_vbox.yml @@ -17,6 +17,8 @@ name: oracle-epel-release-el8 state: present when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8' + retries: 5 + delay: 10 - name: Enable ol8_developer_EPEL repo ansible.builtin.command: @@ -34,6 +36,8 @@ - perl - xcb-util-cursor state: present + retries: 5 + delay: 10 - name: Add virtualbox repo keys ansible.builtin.rpm_key: @@ -50,6 +54,8 @@ ansible.builtin.dnf: name: "VirtualBox-{{ virtualbox_version }}" state: present + retries: 5 + delay: 10 - name: Check if extension pack is already installed ansible.builtin.shell: | diff --git a/ol/provision_vnc.yml b/ol/provision_vnc.yml index 85a7a18..8a825ea 100644 --- a/ol/provision_vnc.yml +++ b/ol/provision_vnc.yml @@ -16,6 +16,8 @@ ansible.builtin.dnf: name: '@Server with GUI' state: present + retries: 5 + delay: 10 - name: Installing the vnc package ansible.builtin.dnf: @@ -23,6 +25,8 @@ - tigervnc-server - tigervnc-server-module state: present + retries: 5 + delay: 10 - name: Set systemd default boot target to graphical.target ansible.builtin.file: diff --git a/ol/update_all_rpms.yml b/ol/update_all_rpms.yml index d10b15b..046e3cc 100644 --- a/ol/update_all_rpms.yml +++ b/ol/update_all_rpms.yml @@ -18,6 +18,8 @@ state: latest update_only: true when: ansible_distribution == 'OracleLinux' + retries: 5 + delay: 10 - name: Check if a reboot is required ansible.builtin.command: /usr/bin/needs-restarting -r From 4191040fe22645047449bae14a7f49d1212ee24e Mon Sep 17 00:00:00 2001 From: William Graef Date: Tue, 28 Jan 2025 11:00:25 -0500 Subject: [PATCH 2/3] fix typo in play name --- ol/create_instance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ol/create_instance.yml b/ol/create_instance.yml index b2215b1..4f12701 100644 --- a/ol/create_instance.yml +++ b/ol/create_instance.yml @@ -58,7 +58,7 @@ msg: "{{ my_region_id }}" when: debug_enabled - - name: Get list availbility domains + - name: Get list availability domains oracle.oci.oci_identity_availability_domain_facts: compartment_id: "{{ my_tenancy_id }}" region: "{{ my_region_id }}" From cfb6d8693f6690431f162e2d3c690233c2578483 Mon Sep 17 00:00:00 2001 From: William Graef Date: Tue, 28 Jan 2025 11:02:55 -0500 Subject: [PATCH 3/3] update req for collections --- ol/requirements.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/ol/requirements.yml b/ol/requirements.yml index fa329b2..965fa5c 100644 --- a/ol/requirements.yml +++ b/ol/requirements.yml @@ -7,26 +7,10 @@ # roles: collections: - - name: https://github.com/ansible-collections/community.general.git - type: git - version: main - - - name: https://github.com/ansible-collections/ansible.posix.git - type: git - version: main - - - name: https://github.com/oracle/oci-ansible-collection.git - type: git - version: master - - - name: https://github.com/ansible-collections/community.postgresql.git - type: git - version: main - - - name: https://github.com/ansible-collections/community.crypto.git - type: git - version: main - - - name: https://github.com/ansible-collections/community.libvirt.git - type: git - version: main \ No newline at end of file + - ansible.posix + - community.general + - community.postgresql + - community.crypto + - freeipa.ansible_freeipa + - community.libvirt + - oracle.oci \ No newline at end of file