2024-03-28 17:15:28 -07:00
|
|
|
# This is a basic playbook
|
2024-11-25 18:24:56 +10:00
|
|
|
---
|
2024-03-28 17:15:28 -07:00
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
|
|
|
|
vars:
|
|
|
|
myhosts: "os_control:os_control_stg"
|
2024-03-28 17:12:37 -07:00
|
|
|
|
2025-01-22 07:30:55 +10:00
|
|
|
- name: Make the box be real
|
2024-03-28 17:12:37 -07:00
|
|
|
hosts: os_control:os_control_stg
|
|
|
|
user: root
|
2024-11-25 18:24:56 +10:00
|
|
|
gather_facts: true
|
2024-03-28 17:12:37 -07:00
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
|
|
- "/srv/private/ansible/vars.yml"
|
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- base
|
|
|
|
- rkhunter
|
|
|
|
- nagios_client
|
|
|
|
- hosts
|
|
|
|
- ipa/client
|
|
|
|
- rsyncd
|
|
|
|
- sudo
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Create the directories to hold the templates
|
2024-12-17 15:31:55 +10:00
|
|
|
ansible.builtin.file:
|
2024-03-28 17:12:37 -07:00
|
|
|
path: "/etc/openshift_apps"
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
2024-11-25 18:24:56 +10:00
|
|
|
mode: "0770"
|
2024-03-28 17:12:37 -07:00
|
|
|
|
2025-01-27 08:09:02 +00:00
|
|
|
- name: Install helm if not exists
|
2025-01-27 17:52:07 -08:00
|
|
|
unarchive:
|
2025-01-27 08:09:02 +00:00
|
|
|
src: https://get.helm.sh/helm-v3.17.0-linux-amd64.tar.gz
|
|
|
|
dest: /usr/local/bin
|
|
|
|
extra_opts: "--strip-components=1"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0755
|
|
|
|
remote_src: true
|
2025-01-27 17:52:07 -08:00
|
|
|
args:
|
2025-01-27 08:09:02 +00:00
|
|
|
creates: /usr/local/bin/helm
|
|
|
|
|
2025-01-22 07:30:55 +10:00
|
|
|
- name: Copy oc rpm
|
2024-12-18 08:23:28 +10:00
|
|
|
ansible.builtin.copy:
|
2024-03-28 17:12:37 -07:00
|
|
|
src: /srv/web/infra/bigfiles/openshiftboot/oc-client/oc-client.rpm
|
|
|
|
dest: /root/oc-client.rpm
|
|
|
|
|
2025-01-22 07:30:55 +10:00
|
|
|
- name: Make sure oc-client is installed
|
2024-03-28 17:12:37 -07:00
|
|
|
dnf:
|
|
|
|
name: /root/oc-client.rpm
|
|
|
|
state: installed
|
|
|
|
|
2025-01-22 07:30:55 +10:00
|
|
|
- name: Copy the jobs-summary script
|
2024-12-18 08:23:28 +10:00
|
|
|
ansible.builtin.copy:
|
2024-05-29 14:13:27 +02:00
|
|
|
src: "{{ files }}/scripts/jobs-summary"
|
|
|
|
dest: /usr/local/bin/jobs-summary
|
2024-11-25 18:24:56 +10:00
|
|
|
mode: "0755"
|
2024-05-29 14:13:27 +02:00
|
|
|
|
2024-03-28 17:12:37 -07:00
|
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
|
|
|
|
handlers:
|
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|