--- - name: Fix permission on phab git repo hosts: app, phd tags: ['conf-app', 'conf-phd'] user: centos become: yes vars_files: - "{{ var }}" tasks: - file: state: directory owner: "{{ phd_user }}" group: "{{ phd_user }}" path: "{{ phabricator_path }}" recurse: yes - name: Phabricator in read-only mode hosts: app, phd tags: ['conf-app', 'conf-phd'] run_once: true user: centos become: yes vars_files: - "{{ var }}" tasks: - shell: "{{ phabricator_path }}phabricator/bin/config set cluster.read-only true" - name: Stop PHD hosts: phd tags: ['conf-phd'] run_once: true user: centos become: yes vars_files: - "{{ var }}" tasks: - service: name=phd state=stopped - name: Update phabricator hosts: app, phd tags: ['conf-app', 'conf-phd'] serial: 1 user: centos become: yes become_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: Clone c4science/libphutil git: repo: https://c4science.ch/source/libphutil.git dest: "{{ phabricator_path }}libphutil" version: "{{ phabricator_branch }}" update: true - name: Clone phacility/arcanist git: repo: https://secure.phabricator.com/diffusion/ARC/arcanist.git dest: "{{ phabricator_path }}arcanist" version: "stable" update: true - name: Clone c4science/phabricator git: repo: https://c4science.ch/source/phab.git dest: "{{ phabricator_path }}phabricator" version: "{{ phabricator_branch }}" update: 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 tags: ['conf-app'] serial: 1 user: centos become: yes vars_files: - "{{ var }}" tasks: - service: name=httpd24-httpd state=restarted - name: Start PHD hosts: phd tags: ['conf-phd'] run_once: true user: centos become: yes vars_files: - "{{ var }}" tasks: - service: name=phd state=started - name: Phabricator in normal mode hosts: app, phd tags: ['conf-app', 'conf-phd'] run_once: true user: centos become: yes vars_files: - "{{ var }}" tasks: - shell: "{{ phabricator_path }}/phabricator/bin/config set cluster.read-only false" - name: Check HTTP status code of public pages hosts: 127.0.0.1 tags: always connection: local gather_facts: false vars_files: - "{{ var }}" tasks: - shell: "../utils/check_http.sh {{ http_scheme }}{{ domain }}"