67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
# This is a basic playbook
|
|
---
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
|
|
vars:
|
|
myhosts: "os_control:os_control_stg"
|
|
|
|
- name: Make the box be real
|
|
hosts: os_control:os_control_stg
|
|
user: root
|
|
gather_facts: true
|
|
|
|
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
|
|
ansible.builtin.file:
|
|
path: "/etc/openshift_apps"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0770"
|
|
|
|
- name: Install helm if not exists
|
|
unarchive:
|
|
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
|
|
args:
|
|
creates: /usr/local/bin/helm
|
|
|
|
- name: Copy oc rpm
|
|
ansible.builtin.copy:
|
|
src: /srv/web/infra/bigfiles/openshiftboot/oc-client/oc-client.rpm
|
|
dest: /root/oc-client.rpm
|
|
|
|
- name: Make sure oc-client is installed
|
|
dnf:
|
|
name: /root/oc-client.rpm
|
|
state: installed
|
|
|
|
- name: Copy the jobs-summary script
|
|
ansible.builtin.copy:
|
|
src: "{{ files }}/scripts/jobs-summary"
|
|
dest: /usr/local/bin/jobs-summary
|
|
mode: "0755"
|
|
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|