From f15847c448082b8f751e001480b1df5fa0f3bd6c Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 27 Jan 2016 16:28:10 +0000 Subject: [PATCH] Some fixes to the pdc upgrade playbook. --- playbooks/manual/upgrade/pdc.yml | 36 ++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/playbooks/manual/upgrade/pdc.yml b/playbooks/manual/upgrade/pdc.yml index d9ae5844e8..496f3ab069 100644 --- a/playbooks/manual/upgrade/pdc.yml +++ b/playbooks/manual/upgrade/pdc.yml @@ -1,18 +1,3 @@ -- name: push packages out - hosts: pdc-backend;pdc-backend-stg;pdc-web;pdc-web-stg - user: root - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - - tasks: - - name: clean all metadata - command: yum clean all - always_run: yes - - name: yum update PDC packages - yum: name="pdc-*" state=latest - - name: verify the backend, and stop it hosts: pdc-backend;pdc-backend-stg user: root @@ -23,6 +8,16 @@ handlers: - include: "{{ handlers }}/restart_services.yml" + pre_tasks: + - name: clean all metadata + command: yum clean all + always_run: yes + - name: yum update PDC packages + yum: name="{{item}}" state=latest + with_items: + - pdc-client + - pdc-updater + roles: - pdc/backend @@ -44,6 +39,15 @@ handlers: - include: "{{ handlers }}/restart_services.yml" + pre_tasks: + - name: clean all metadata + command: yum clean all + always_run: yes + - name: yum update PDC packages + yum: name="{{item}}" state=latest + with_items: + - python-pdc + roles: - pdc/frontend @@ -57,7 +61,7 @@ command: python /usr/lib/python2.7/site-packages/pdc/manage.py syncdb --noinput args: chdir: /usr/lib/python2.7/site-packages/pdc/ - when: inventory_shortname == 'pdc-web01' + when: inventory_hostname_short == 'pdc-web01' - service: name="httpd" state=started - name: tell nagios to unshush w.r.t. the frontend nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}