--- ## Install Phabricator # Source: https://github.com/relrod/phabricator-ansible - name: Create log directory file: state=directory path=/var/log/phabricator owner="{{ phd_user }}" group="{{ phd_user }}" - name: Create directory file: state=directory path=/srv/www owner="{{ phd_user }}" - name: Create tmp directory file: state=directory path=/var/tmp/phd/ owner="{{ phd_user }}" - name: Clone phacility/libphutil git: repo: https://github.com/phacility/libphutil dest: "{{ phabricator_path }}libphutil" version: stable update: false sudo_user: "{{ phd_user }}" - name: Clone phacility/arcanist git: repo: https://github.com/phacility/arcanist.git dest: "{{ phabricator_path }}arcanist" version: stable update: false sudo_user: "{{ phd_user }}" - name: Create symlink for arc file: path: /usr/local/bin/arc src: "{{ phabricator_path }}arcanist/bin/arc" state: link - name: Clone phacility/phabricator git: repo: https://github.com/phacility/phabricator.git dest: "{{ phabricator_path }}phabricator" version: stable update: false sudo_user: "{{ phd_user }}" - name: Remove local configuration if present file: path="{{ phabricator_path }}phabricator/conf/local/local.json" state=absent - name: Create a conf/custom directory. file: state=directory path={{ phabricator_path }}phabricator/conf/custom sudo_user: "{{ phd_user }}" - name: Place a starting-point custom config in {{ phabricator_path }}phabricator/conf/custom/myconfig.conf.php template: src: "{{ myconfig }}" dest: "{{ phabricator_path }}phabricator/conf/custom/myconfig.conf.php" mode: 0644 owner: root group: "{{ phd_user }}" notify: reload apache - name: Include the config shell: echo 'custom/myconfig' > {{ phabricator_path }}phabricator/conf/local/ENVIRONMENT args: creates: "{{ phabricator_path }}phabricator/conf/local/ENVIRONMENT" sudo_user: "{{ phd_user }}" - name: Migrate the database command: chdir={{ phabricator_path }}phabricator ./bin/storage upgrade --force sudo_user: "{{ phd_user }}" run_once: yes when: "'app' in group_names" - name: Email with postfix lineinfile: dest: /etc/aliases line: "{{ phd_user }}: |{{ phabricator_path }}phabricator/scripts/mail/mail_handler.php" when: "'app' in group_names"