From 0bc817d06616bd59e8bdf8269bc0c3c6710740f8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mon, 8 Dec 2014 20:44:36 +0100 Subject: [PATCH] Add the tasks to set up the backend, crawler and frontend --- playbooks/groups/mirrormanager.yml | 51 ++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/playbooks/groups/mirrormanager.yml b/playbooks/groups/mirrormanager.yml index 5b3c6046ab..23780412e9 100644 --- a/playbooks/groups/mirrormanager.yml +++ b/playbooks/groups/mirrormanager.yml @@ -14,7 +14,7 @@ handlers: - include: "{{ handlers }}/restart_services.yml" -- name: make the boxen be real for real +- name: make the boxe be real for real hosts: mm-stg user: root gather_facts: True @@ -35,7 +35,6 @@ - { role: openvpn/client, when: env != "staging" } - { role: nfs/client, when: datacenter == "phx2", mnt_dir: '/srv/pub', nfs_src_dir: 'fedora_ftp/fedora.redhat.com/pub' } - tasks: - include: "{{ tasks }}/yumrepos.yml" - include: "{{ tasks }}/2fa_client.yml" @@ -43,3 +42,51 @@ handlers: - include: "{{ handlers }}/restart_services.yml" + +- name: Deploy the backend + hosts: mm-backend01.stg.phx2.fedoraproject.org + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - mirrormanager/backend + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: Deploy the crawler + hosts: mm-crawler01.stg.phx2.fedoraproject.org + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - mirrormanager/crawler + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: Deploy the frontend (web-app) + hosts: mm-frontend01.stg.phx2.fedoraproject.org + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - mirrormanager/frontend + + handlers: + - include: "{{ handlers }}/restart_services.yml"