From 28bca8208d7c0d5972116b5054b9451a5e06d4f9 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 28 Mar 2024 17:12:37 -0700 Subject: [PATCH] os-control: re-add a playbook and move to rhel9 in staging We accidentally dropped the os-control playbook, since it was part of the openshift 3.11 cluster playbooks. So, re-add that here, and move staging over to rhel9. Signed-off-by: Kevin Fenzi --- .../os-control01.stg.iad2.fedoraproject.org | 4 +- main.yml | 1 + playbooks/groups/os-control.yml | 47 +++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 playbooks/groups/os-control.yml diff --git a/inventory/host_vars/os-control01.stg.iad2.fedoraproject.org b/inventory/host_vars/os-control01.stg.iad2.fedoraproject.org index 2e6fea45ff..8140a867b0 100644 --- a/inventory/host_vars/os-control01.stg.iad2.fedoraproject.org +++ b/inventory/host_vars/os-control01.stg.iad2.fedoraproject.org @@ -3,8 +3,8 @@ baseiptables: true datacenter: iad2 eth0_ipv4_gw: 10.3.166.254 eth0_ipv4_ip: 10.3.166.50 -ks_repo: http://10.3.163.35/repo/rhel/RHEL7-x86_64/ -ks_url: http://10.3.163.35/repo/rhel/ks/kvm-rhel-7-iad2 +ks_repo: http://10.3.163.35/repo/rhel/RHEL9-x86_64/ +ks_url: http://10.3.163.35/repo/rhel/ks/kvm-rhel lvm_size: 100g mem_size: 4096 vmhost: vmhost-x86-11.stg.iad2.fedoraproject.org diff --git a/main.yml b/main.yml index a765182c1a..4654a5c2bd 100644 --- a/main.yml +++ b/main.yml @@ -48,6 +48,7 @@ - import_playbook: /srv/web/infra/ansible/playbooks/groups/mirrormanager.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/nfs-servers.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/noc.yml +- import_playbook: /srv/web/infra/ansible/playbooks/groups/os-control.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/oci-registry.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/odcs.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/openqa-workers.yml diff --git a/playbooks/groups/os-control.yml b/playbooks/groups/os-control.yml new file mode 100644 index 0000000000..860f3bb726 --- /dev/null +++ b/playbooks/groups/os-control.yml @@ -0,0 +1,47 @@ +# create an os server +- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=os_control_stg:os_control" + +- 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 + file: + path: "/etc/openshift_apps" + state: directory + owner: root + group: root + mode: 0770 + + - name: copy oc rpm + 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 + + - import_tasks: "{{ tasks_path }}/yumrepos.yml" + - import_tasks: "{{ tasks_path }}/motd.yml" + + handlers: + - import_tasks: "{{ handlers_path }}/restart_services.yml"