From c2e5f4597dedeeec84d148c5afe903d585b07b3c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 28 May 2015 13:32:01 +0000 Subject: [PATCH] Add missing playbooks to master playbook. (mariadb, torrent, beaker-virthost, secondary) Move logserver to groups. It's only one host, but there might be more someday. Merge the copr new cloud playbooks to the normal names since we are mirgated now to the new cloud. Drop junk02 playbook as we don't have a junk02 currently. Add commented people playbook to master, it's not ready yet, but should be noted there for when it is. --- master.yml | 16 ++++- playbooks/groups/copr-backend-newcloud.yml | 61 ------------------- playbooks/groups/copr-backend.yml | 37 ++++++++--- playbooks/groups/copr-frontend-newcloud.yml | 54 ---------------- playbooks/groups/copr-frontend.yml | 25 ++++++-- playbooks/groups/copr-keygen-newcloud.yml | 54 ---------------- playbooks/groups/copr-keygen.yml | 43 ++++++++----- playbooks/{hosts => groups}/logserver.yml | 0 .../hosts/junk02.phx2.fedoraproject.org.yml | 29 --------- 9 files changed, 90 insertions(+), 229 deletions(-) delete mode 100644 playbooks/groups/copr-backend-newcloud.yml delete mode 100644 playbooks/groups/copr-frontend-newcloud.yml delete mode 100644 playbooks/groups/copr-keygen-newcloud.yml rename playbooks/{hosts => groups}/logserver.yml (100%) delete mode 100644 playbooks/hosts/junk02.phx2.fedoraproject.org.yml diff --git a/master.yml b/master.yml index d188bf155b..0881fa4809 100644 --- a/master.yml +++ b/master.yml @@ -24,6 +24,7 @@ - include: /srv/web/infra/ansible/playbooks/groups/bastion.yml - include: /srv/web/infra/ansible/playbooks/groups/beaker.yml #- include: /srv/web/infra/ansible/playbooks/groups/beaker-stg.yml +- include: /srv/web/infra/ansible/playbooks/groups/beaker-virthosts.yml - include: /srv/web/infra/ansible/playbooks/groups/blockerbugs.yml - include: /srv/web/infra/ansible/playbooks/groups/bodhi.yml - include: /srv/web/infra/ansible/playbooks/groups/bodhi-backend.yml @@ -32,7 +33,7 @@ - include: /srv/web/infra/ansible/playbooks/groups/buildvm.yml - include: /srv/web/infra/ansible/playbooks/groups/busgateway.yml - include: /srv/web/infra/ansible/playbooks/groups/composers.yml -#- include: /srv/web/infra/ansible/playbooks/groups/copr-backend.yml +- include: /srv/web/infra/ansible/playbooks/groups/copr-backend.yml - include: /srv/web/infra/ansible/playbooks/groups/copr-frontend.yml - include: /srv/web/infra/ansible/playbooks/groups/copr-keygen.yml - include: /srv/web/infra/ansible/playbooks/groups/datagrepper.yml @@ -56,8 +57,10 @@ - include: /srv/web/infra/ansible/playbooks/groups/kojipkgs.yml - include: /srv/web/infra/ansible/playbooks/groups/koschei.yml - include: /srv/web/infra/ansible/playbooks/groups/lockbox.yml +- include: /srv/web/infra/ansible/playbooks/groups/logserver.yml # Waiting for rhel7 python3 and reinstall #- include: /srv/web/infra/ansible/playbooks/groups/mailman.yml +- include: /srv/web/infra/ansible/playbooks/groups/mariadb-server.yml - include: /srv/web/infra/ansible/playbooks/groups/mirrorlist2.yml - include: /srv/web/infra/ansible/playbooks/groups/mirrormanager.yml - include: /srv/web/infra/ansible/playbooks/groups/memcached.yml @@ -65,9 +68,12 @@ - include: /srv/web/infra/ansible/playbooks/groups/notifs-backend.yml - include: /srv/web/infra/ansible/playbooks/groups/notifs-web.yml - include: /srv/web/infra/ansible/playbooks/groups/nuancier.yml +- include: /srv/web/infra/ansible/playbooks/groups/openstack-compute-nodes.yml - include: /srv/web/infra/ansible/playbooks/groups/packages.yml - include: /srv/web/infra/ansible/playbooks/groups/pagure.yml - include: /srv/web/infra/ansible/playbooks/groups/paste.yml +# not deployed yet. +#- include: /srv/web/infra/ansible/playbooks/groups/people.yml - include: /srv/web/infra/ansible/playbooks/groups/pkgdb.yml - include: /srv/web/infra/ansible/playbooks/groups/pkgs.yml - include: /srv/web/infra/ansible/playbooks/groups/postgresql-server.yml @@ -79,6 +85,7 @@ - include: /srv/web/infra/ansible/playbooks/groups/resultsdb-stg.yml - include: /srv/web/infra/ansible/playbooks/groups/retrace.yml - include: /srv/web/infra/ansible/playbooks/groups/releng-compose.yml +- include: /srv/web/infra/ansible/playbooks/groups/secondary.yml - include: /srv/web/infra/ansible/playbooks/groups/smtp-mm.yml - include: /srv/web/infra/ansible/playbooks/groups/sign-bridge.yml - include: /srv/web/infra/ansible/playbooks/groups/summershum.yml @@ -90,6 +97,7 @@ - include: /srv/web/infra/ansible/playbooks/groups/taskotron-dev-clients.yml - include: /srv/web/infra/ansible/playbooks/groups/taskotron-stg.yml - include: /srv/web/infra/ansible/playbooks/groups/taskotron-stg-clients.yml +- include: /srv/web/infra/ansible/playbooks/groups/torrent.yml - include: /srv/web/infra/ansible/playbooks/groups/unbound.yml - include: /srv/web/infra/ansible/playbooks/groups/value.yml - include: /srv/web/infra/ansible/playbooks/groups/virthost.yml @@ -100,14 +108,16 @@ # - include: /srv/web/infra/ansible/playbooks/hosts/artboard.cloud.fedoraproject.org.yml +- include: /srv/web/infra/ansible/playbooks/hosts/blockerbugs-dev.cloud.fedoraproject.org.yml - include: /srv/web/infra/ansible/playbooks/hosts/bodhi.dev.fedoraproject.org.yml - include: /srv/web/infra/ansible/playbooks/hosts/cloud-noc01.cloud.fedoraproject.org.yml - include: /srv/web/infra/ansible/playbooks/hosts/elections-dev.cloud.fedoraproject.org.yml +- include: /srv/web/infra/ansible/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml - include: /srv/web/infra/ansible/playbooks/hosts/fedocal.dev.fedoraproject.org.yml +- include: /srv/web/infra/ansible/playbooks/hosts/junk01.phx2.fedoraproject.org.yml - include: /srv/web/infra/ansible/playbooks/hosts/koschei.cloud.fedoraproject.org.yml # Waiting for rhel7 python3 and reinstall #- include: /srv/web/infra/ansible/playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml -- include: /srv/web/infra/ansible/playbooks/hosts/logserver.yml - include: /srv/web/infra/ansible/playbooks/hosts/logstash-dev.cloud.fedoraproject.org.yml - include: /srv/web/infra/ansible/playbooks/hosts/shogun-ca.cloud.fedoraproject.org.yml -- include: /srv/web/infra/ansible/playbooks/hosts/blockerbugs-dev.cloud.fedoraproject.org.yml +- include: /srv/web/infra/ansible/playbooks/hosts/taiga.cloud.fedoraproject.org.yml diff --git a/playbooks/groups/copr-backend-newcloud.yml b/playbooks/groups/copr-backend-newcloud.yml deleted file mode 100644 index ad2f86d57b..0000000000 --- a/playbooks/groups/copr-backend-newcloud.yml +++ /dev/null @@ -1,61 +0,0 @@ -- name: check/create instance - #hosts: copr-back - hosts: copr-back:copr-back-stg - #hosts: copr-back-stg - user: fedora - sudo: True - #user: root - gather_facts: False - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - /srv/private/ansible/vars.yml - - /srv/web/infra/ansible/vars/fedora-cloud.yml - - /srv/private/ansible/files/openstack/passwords.yml - tasks: - - include: "{{ tasks }}/persistent_cloud_new.yml" - - name: clean out old known_hosts for copr-be-dev - local_action: known_hosts path={{item}} host=copr-be-dev.cloud.fedoraproject.org state=absent - ignore_errors: True - with_items: - - /root/.ssh/known_hosts - - /etc/ssh/ssh_known_hosts - - include: "{{ tasks }}/growroot_cloud.yml" - -- name: cloud basic setup - #hosts: copr-back - hosts: copr-back:copr-back-stg - #hosts: copr-back-stg - user: fedora - sudo: True - gather_facts: True - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - /srv/private/ansible/vars.yml - - tasks: - - include: "{{ tasks }}/cloud_setup_basic.yml" - - - name: set hostname (required by some services, at least postfix need it) - shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - -- name: provision instance - #hosts: copr-back - hosts: copr-back:copr-back-stg - #hosts: copr-back-stg - #user: root - gather_facts: True - user: fedora - sudo: True - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - /srv/private/ansible/vars.yml - - /srv/private/ansible/files/openstack/passwords.yml - - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - - # Roles are run first, before tasks, regardless of where you place them here. - roles: - - base - - copr/backend - - fedmsg/base diff --git a/playbooks/groups/copr-backend.yml b/playbooks/groups/copr-backend.yml index c317408f35..ad2f86d57b 100644 --- a/playbooks/groups/copr-backend.yml +++ b/playbooks/groups/copr-backend.yml @@ -1,36 +1,57 @@ - name: check/create instance + #hosts: copr-back hosts: copr-back:copr-back-stg #hosts: copr-back-stg - user: root + user: fedora + sudo: True + #user: root gather_facts: False vars_files: - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - + - /srv/private/ansible/vars.yml + - /srv/web/infra/ansible/vars/fedora-cloud.yml + - /srv/private/ansible/files/openstack/passwords.yml tasks: - - include: "{{ tasks }}/persistent_cloud.yml" + - include: "{{ tasks }}/persistent_cloud_new.yml" + - name: clean out old known_hosts for copr-be-dev + local_action: known_hosts path={{item}} host=copr-be-dev.cloud.fedoraproject.org state=absent + ignore_errors: True + with_items: + - /root/.ssh/known_hosts + - /etc/ssh/ssh_known_hosts - include: "{{ tasks }}/growroot_cloud.yml" - name: cloud basic setup + #hosts: copr-back hosts: copr-back:copr-back-stg #hosts: copr-back-stg + user: fedora + sudo: True + gather_facts: True vars_files: - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" + - /srv/private/ansible/vars.yml tasks: - include: "{{ tasks }}/cloud_setup_basic.yml" + - name: set hostname (required by some services, at least postfix need it) + shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" + - name: provision instance + #hosts: copr-back hosts: copr-back:copr-back-stg #hosts: copr-back-stg - user: root - gather_facts: False + #user: root + gather_facts: True + user: fedora + sudo: True vars_files: - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" + - /srv/private/ansible/vars.yml + - /srv/private/ansible/files/openstack/passwords.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml # Roles are run first, before tasks, regardless of where you place them here. diff --git a/playbooks/groups/copr-frontend-newcloud.yml b/playbooks/groups/copr-frontend-newcloud.yml deleted file mode 100644 index 01927747e9..0000000000 --- a/playbooks/groups/copr-frontend-newcloud.yml +++ /dev/null @@ -1,54 +0,0 @@ -- name: check/create instance - hosts: copr-front-stg:copr-front - # hosts: copr-front - user: fedora - sudo: True - gather_facts: False - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - /srv/web/infra/ansible/vars/fedora-cloud.yml - - /srv/private/ansible/files/openstack/passwords.yml - - tasks: - - include: "{{ tasks }}/persistent_cloud_new.yml" - - name: clean out old known_hosts for copr-fe-dev - local_action: known_hosts path={{item}} host=copr-fe-dev.cloud.fedoraproject.org state=absent - ignore_errors: True - with_items: - - /root/.ssh/known_hosts - - /etc/ssh/ssh_known_hosts - - include: "{{ tasks }}/growroot_cloud.yml" - - -- name: cloud basic setup - hosts: copr-front-stg:copr-front - # hosts: copr-front - user: fedora - sudo: True - gather_facts: True - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - tasks: - - include: "{{ tasks }}/cloud_setup_basic.yml" - - name: set hostname (required by some services, at least postfix need it) - shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - -- name: provision instance - hosts: copr-front:copr-front-stg - # hosts: copr-front - user: fedora - sudo: True - 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 - - copr/frontend diff --git a/playbooks/groups/copr-frontend.yml b/playbooks/groups/copr-frontend.yml index 89eaacf13b..01927747e9 100644 --- a/playbooks/groups/copr-frontend.yml +++ b/playbooks/groups/copr-frontend.yml @@ -1,21 +1,33 @@ - name: check/create instance hosts: copr-front-stg:copr-front - #hosts: copr-front - user: root + # hosts: copr-front + user: fedora + sudo: True gather_facts: False vars_files: - /srv/web/infra/ansible/vars/global.yml - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/fedora-cloud.yml + - /srv/private/ansible/files/openstack/passwords.yml tasks: - - include: "{{ tasks }}/persistent_cloud.yml" + - include: "{{ tasks }}/persistent_cloud_new.yml" + - name: clean out old known_hosts for copr-fe-dev + local_action: known_hosts path={{item}} host=copr-fe-dev.cloud.fedoraproject.org state=absent + ignore_errors: True + with_items: + - /root/.ssh/known_hosts + - /etc/ssh/ssh_known_hosts - include: "{{ tasks }}/growroot_cloud.yml" - name: cloud basic setup hosts: copr-front-stg:copr-front - #hosts: copr-front + # hosts: copr-front + user: fedora + sudo: True + gather_facts: True vars_files: - /srv/web/infra/ansible/vars/global.yml - "/srv/private/ansible/vars.yml" @@ -27,8 +39,9 @@ - name: provision instance hosts: copr-front:copr-front-stg - #hosts: copr-front - user: root + # hosts: copr-front + user: fedora + sudo: True gather_facts: True vars_files: diff --git a/playbooks/groups/copr-keygen-newcloud.yml b/playbooks/groups/copr-keygen-newcloud.yml deleted file mode 100644 index 72483ad491..0000000000 --- a/playbooks/groups/copr-keygen-newcloud.yml +++ /dev/null @@ -1,54 +0,0 @@ -- name: check/create instance - hosts: copr-keygen-stg:copr-keygen - #hosts: copr-keygen - user: fedora - sudo: True - gather_facts: False - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - /srv/web/infra/ansible/vars/fedora-cloud.yml - - /srv/private/ansible/files/openstack/passwords.yml - - tasks: - - include: "{{ tasks }}/persistent_cloud_new.yml" - - name: clean out old known_hosts for copr-keygen - local_action: known_hosts path={{item}} host=copr-keygen.cloud.fedoraproject.org state=absent - ignore_errors: True - with_items: - - /root/.ssh/known_hosts - - /etc/ssh/ssh_known_hosts - - include: "{{ tasks }}/growroot_cloud.yml" - - -- name: cloud basic setup - hosts: copr-keygen-stg:copr-keygen - # hosts: copr-keygen - user: fedora - sudo: True - gather_facts: True - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - tasks: - - include: "{{ tasks }}/cloud_setup_basic.yml" - - name: set hostname (required by some services, at least postfix need it) - shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - -- name: provision instance - hosts: copr-keygen:copr-keygen-stg - #hosts: copr-keygen - user: fedora - sudo: True - 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 - - copr/keygen diff --git a/playbooks/groups/copr-keygen.yml b/playbooks/groups/copr-keygen.yml index 4405171e7a..72483ad491 100644 --- a/playbooks/groups/copr-keygen.yml +++ b/playbooks/groups/copr-keygen.yml @@ -1,20 +1,33 @@ - name: check/create instance - #hosts: copr-keygen:copr-keygen-stg - hosts: copr-keygen-stg - user: root + hosts: copr-keygen-stg:copr-keygen + #hosts: copr-keygen + user: fedora + sudo: True gather_facts: False vars_files: - /srv/web/infra/ansible/vars/global.yml - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/fedora-cloud.yml + - /srv/private/ansible/files/openstack/passwords.yml tasks: - - include: "{{ tasks }}/persistent_cloud.yml" + - include: "{{ tasks }}/persistent_cloud_new.yml" + - name: clean out old known_hosts for copr-keygen + local_action: known_hosts path={{item}} host=copr-keygen.cloud.fedoraproject.org state=absent + ignore_errors: True + with_items: + - /root/.ssh/known_hosts + - /etc/ssh/ssh_known_hosts - include: "{{ tasks }}/growroot_cloud.yml" + - name: cloud basic setup - #hosts: copr-keygen:copr-keygen-stg - hosts: copr-keygen-stg + hosts: copr-keygen-stg:copr-keygen + # hosts: copr-keygen + user: fedora + sudo: True + gather_facts: True vars_files: - /srv/web/infra/ansible/vars/global.yml - "/srv/private/ansible/vars.yml" @@ -25,15 +38,17 @@ shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - name: provision instance - #hosts: copr-keygen:copr-keygen-stg - hosts: copr-keygen-stg - gather_facts: False - user: root + hosts: copr-keygen:copr-keygen-stg + #hosts: copr-keygen + user: fedora + sudo: True + 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 + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + roles: - base - copr/keygen - diff --git a/playbooks/hosts/logserver.yml b/playbooks/groups/logserver.yml similarity index 100% rename from playbooks/hosts/logserver.yml rename to playbooks/groups/logserver.yml diff --git a/playbooks/hosts/junk02.phx2.fedoraproject.org.yml b/playbooks/hosts/junk02.phx2.fedoraproject.org.yml deleted file mode 100644 index 5d7c301418..0000000000 --- a/playbooks/hosts/junk02.phx2.fedoraproject.org.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This is a basic playbook - -- name: make basic box - hosts: junk02.phx2.fedoraproject.org - 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 - - fas_client - - collectd/base - - sudo - - tasks: - - include: "{{ tasks }}/yumrepos.yml" - - include: "{{ tasks }}/2fa_client.yml" - - include: "{{ tasks }}/motd.yml" - - handlers: - - include: "{{ handlers }}/restart_services.yml" - - include: "{{ handlers }}/semanage.yml"