diff --git a/tasks/update_phab.yml b/tasks/update_phab.yml index b5538ea..49a461d 100644 --- a/tasks/update_phab.yml +++ b/tasks/update_phab.yml @@ -1,65 +1,74 @@ --- +- name: Fix permission on phab git repo + hosts: app, phd + user: centos + sudo: yes + vars_files: + - "{{ var }}" + tasks: + - shell: "chown -R {{ phd_user }}.{{ phd_user }} {{ phabricator_path }}" + - name: Update phabricator on app instances hosts: app, phd user: centos sudo: yes sudo_user: "{{ phd_user }}" vars_files: - "{{ var }}" tasks: - name: Set git config shell: "git config --global user.email info@{{ domain }}; git config --global user.name ansible" - name: Stash modification shell: "cd {{ phabricator_path }}libphutil; git stash" - name: Clone phacility/libphutil git: repo: https://github.com/phacility/libphutil dest: "{{ phabricator_path }}libphutil" version: stable update: true - name: Stash apply modification shell: "cd {{ phabricator_path }}libphutil; git stash apply; true" - name: Stash modification shell: "cd {{ phabricator_path }}arcanist; git stash" - name: Clone phacility/arcanist git: repo: https://github.com/phacility/arcanist.git dest: "{{ phabricator_path }}arcanist" version: stable update: true - name: Stash apply modification shell: "cd {{ phabricator_path }}arcanist; git stash apply; true" - name: Stash modification shell: "cd {{ phabricator_path }}phabricator; git stash" - name: Clone phacility/phabricator git: repo: https://github.com/phacility/phabricator.git dest: "{{ phabricator_path }}phabricator" version: stable update: true - name: Stash apply modification shell: "cd {{ phabricator_path }}phabricator; git stash apply; true" - name: Migrate the database command: chdir={{ phabricator_path }}phabricator ./bin/storage upgrade --force when: "'{{ inventory_hostname }}' == '{{ groups.app[0] }}'" - name: Restart httpd daemons hosts: app user: centos sudo: yes vars_files: - "{{ var }}" tasks: - service: name=httpd state=restarted - name: Restart phd daemons hosts: phd user: centos sudo: yes vars_files: - "{{ var }}" tasks: - service: name=phd state=restarted