Skip to content

Commit 4cb2091

Browse files
committed
update builder utility install for 2.3 and ol9
1 parent f2bc564 commit 4cb2091

File tree

4 files changed

+67
-22
lines changed

4 files changed

+67
-22
lines changed

olam/provision_builder.yml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
tasks:
1515

16-
- name: Install Oracle Linux Automation Manager repository
16+
- name: Install Oracle Linux Automation Manager repository on OL8
1717
ansible.builtin.dnf:
1818
name: oraclelinux-automation-manager-release-el8
1919
state: present
2020
retries: 5
2121
delay: 10
2222
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2323

24-
- name: Disable Oracle Linux Automation Manager 1.0 repository
24+
- name: Disable Oracle Linux Automation Manager 1.0 repository on OL8
2525
community.general.ini_file:
2626
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
2727
section: ol8_automation
@@ -30,7 +30,7 @@
3030
mode: '0644'
3131
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
3232

33-
- name: Disable Oracle Linux Automation Manager 2.0 repository
33+
- name: Disable Oracle Linux Automation Manager 2.0 repository on OL8
3434
community.general.ini_file:
3535
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
3636
section: ol8_automation2
@@ -39,16 +39,42 @@
3939
mode: '0644'
4040
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
4141

42-
- name: Enable Oracle Linux Automation Manager 2.2 repository
42+
- name: Disable Oracle Linux Automation Manager 2.2 repository on OL8
4343
community.general.ini_file:
4444
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
4545
section: ol8_automation2.2
4646
option: enabled
47+
value: "0"
48+
mode: '0644'
49+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
50+
51+
- name: Enable Oracle Linux Automation Manager 2.3 repository on OL8
52+
community.general.ini_file:
53+
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
54+
section: ol8_automation2.3
55+
option: enabled
4756
value: "1"
4857
mode: '0644'
4958
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
5059

51-
- name: Install Oracle Linux Automation Manager Builder Utility
60+
- name: Install Oracle Linux Automation Manager repository
61+
ansible.builtin.dnf:
62+
name: oraclelinux-automation-manager-release-el9
63+
state: present
64+
retries: 5
65+
delay: 10
66+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
67+
68+
- name: Enable Oracle Linux Automation Manager 2.3 repository
69+
community.general.ini_file:
70+
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
71+
section: ol8_automation2.3
72+
option: enabled
73+
value: "1"
74+
mode: '0644'
75+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
76+
77+
- name: Install Oracle Linux Automation Manager Builder Utility on OL8
5278
ansible.builtin.dnf:
5379
name:
5480
- python3.11-ansible-builder
@@ -58,9 +84,19 @@
5884
delay: 10
5985
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
6086

87+
- name: Install Oracle Linux Automation Manager Builder Utility
88+
ansible.builtin.dnf:
89+
name:
90+
- python3.11-ansible-builder
91+
- python3.11-pip
92+
state: present
93+
retries: 5
94+
delay: 10
95+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
96+
6197
- name: Install Ansible Runner using pip
6298
ansible.builtin.pip:
63-
name: ansible-runner
99+
name: ansible-navigator
64100
executable: pip3.11
65101

66102
- name: Create project directory
@@ -125,7 +161,7 @@
125161
msg: "{{ builder_output.stdout }}"
126162
when: debug_enabled
127163

128-
- name: Create runner private_data_dir
164+
- name: Create ansible project directory
129165
ansible.builtin.file:
130166
path: /tmp/private/project
131167
state: directory

olam/templates/execution_environment.yml.j2

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
11
---
2-
version: 2
2+
version: 3
33

44
build_arg_defaults:
5-
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: "--ignore-certs"
6-
7-
ansible_config: 'ansible.cfg'
5+
ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: '--pre --ignore-certs'
86

97
dependencies:
8+
ansible_runner:
9+
package_pip: ansible-runner
1010
galaxy: requirements.yml
1111
python: requirements.txt
1212
system: bindep.txt
1313

1414
images:
1515
base_image:
16-
name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:2.2
17-
builder_image:
18-
name: container-registry.oracle.com/oracle_linux_automation_manager/olam-builder:2.2
16+
{% if ansible_distribution_major_version == '8' %}
17+
name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:2.3-ol8
18+
{% endif %}
19+
{% if ansible_distribution_major_version == '9' %}
20+
name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:2.3-ol9
21+
{% endif %}
1922

23+
additional_build_files:
24+
- src: ansible.cfg
25+
dest: configs
26+
2027
additional_build_steps:
21-
prepend: |
28+
prepend_galaxy:
29+
- COPY _build/configs/ansible.cfg /etc/ansible/ansible.cfg
30+
prepend_final: |
2231
RUN whoami
2332
RUN cat /etc/os-release
24-
append:
33+
append_final:
2534
- RUN echo This is a post-install command!
2635
- RUN ls -la /etc
27-

olam/templates/requirements.txt.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
setuptools
2-
oci>=2.141.1
1+
requests>=2.4.2
2+
ovirt-engine-sdk-python>=4.6.2
3+
oci>=2.155.0

olam/templates/requirements.yml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
collections:
3-
- name: https://github.com/oracle/oci-ansible-collection.git
4-
type: git
5-
version: master
3+
- name: oracle.oci
4+
version: ">=5.5.0,<6.0.0"
5+
type: galaxy
66
- name: ovirt.ovirt

0 commit comments

Comments
 (0)