|
| 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