Skip to content

Commit a680bee

Browse files
author
William Graef
committed
add pah code
1 parent 0316d3a commit a680bee

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

olam/create_instance.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@
346346
ansible.builtin.import_playbook: provision_kvm.yml
347347
when: use_kvm
348348

349+
- name: Provision Oracle Linux Automation Builder Utility
350+
ansible.builtin.import_playbook: provision_builder.yml
351+
when: use_olam_builder
352+
353+
- name: Provision Oracle Linux Private Automation Hub
354+
ansible.builtin.import_playbook: provision_pah.yml
355+
when: use_olam_pah
356+
349357
- name: Print instances
350358
hosts: all
351359
become: true

olam/default_vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ update_all: false
2222
passwordless_ssh: true
2323
olam_single_host: false
2424
use_olae_only: false
25+
use_olam_builder: false
26+
use_olam_pah: false
2527
use_freeipa: false
2628
use_git: false
2729

olam/provision_pah.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
# Copyright (c) 2025 Oracle and/or its affiliates.
3+
# This software is made available to you under the terms of the Universal Permissive License (UPL), Version 1.0.
4+
# The Universal Permissive License (UPL), Version 1.0 (see COPYING or https://oss.oracle.com/licenses/upl)
5+
# See LICENSE.TXT for details.
6+
7+
- name: Configure Private Automation Hub
8+
hosts: ol-pah
9+
become: true
10+
11+
tasks:
12+
13+
- name: Install Oracle Linux Automation Manager repository
14+
ansible.builtin.dnf:
15+
name: oraclelinux-automation-manager-release-el8
16+
state: present
17+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
18+
19+
- name: Disable Oracle Linux Automation Manager 1.0 repository
20+
community.general.ini_file:
21+
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
22+
section: ol8_automation
23+
option: enabled
24+
value: "0"
25+
mode: '0644'
26+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
27+
28+
- name: Disable Oracle Linux Automation Manager 2.0 repository
29+
community.general.ini_file:
30+
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
31+
section: ol8_automation2
32+
option: enabled
33+
value: "0"
34+
mode: '0644'
35+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
36+
37+
- name: Enable Oracle Linux Automation Manager 2.2 repository
38+
community.general.ini_file:
39+
path: "/etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
40+
section: ol8_automation2.2
41+
option: enabled
42+
value: "1"
43+
mode: '0644'
44+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
45+
46+
- name: Install Oracle Linux Private Automation Hub
47+
ansible.builtin.dnf:
48+
name: ol-private-automation-hub-installer
49+
state: present
50+
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
51+
52+
- name: Copy PAH playbook to home directory
53+
ansible.builtin.copy:
54+
src: /usr/share/ansible/collections/ansible_collections/oraclelinux/private_automation_hub/playbooks/single-node/
55+
dest: ~/single_node
56+
remote_src: true
57+
mode: '0775'
58+
become: true
59+
become_user: "{{ username }}"
60+
61+
- name: Create playbook inventory file
62+
ansible.builtin.template:
63+
src: templates/hosts.j2
64+
dest: ~/single_node/hosts
65+
mode: '0644'
66+
become: true
67+
become_user: "{{ username }}"
68+
69+
# - name: Run PAH installer playbook
70+
# ansible.builtin.shell: |
71+
# ansible-playbook single-node-install.yml -i hosts -e "olpah_admin_password=password olpah_db_password=password"
72+
# become: true
73+
# become: "{{ username }}"

0 commit comments

Comments
 (0)