From a986ecd36ad8e5ad2d70749829e03c8e139fcbbf Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 23 May 2019 07:28:44 +0200 Subject: [PATCH] Passbolt playbook --- passbolt.yml | 5 +++++ roles/passbolt/defaults/main.yml | 10 +++++++++ roles/passbolt/tasks/main.yml | 35 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 passbolt.yml create mode 100644 roles/passbolt/defaults/main.yml create mode 100644 roles/passbolt/tasks/main.yml diff --git a/passbolt.yml b/passbolt.yml new file mode 100644 index 0000000..32f7216 --- /dev/null +++ b/passbolt.yml @@ -0,0 +1,5 @@ +--- +# Deploy Passbolt +- hosts: passbolt.adm.auro.re + roles: + - passbolt diff --git a/roles/passbolt/defaults/main.yml b/roles/passbolt/defaults/main.yml new file mode 100644 index 0000000..d499d24 --- /dev/null +++ b/roles/passbolt/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# URL to clone +passbolt_repo: https://github.com/passbolt/passbolt_api.git +passbolt_version: v2.10.0 + +# Install target +passbolt_path: /var/www/passbolt + +# User used to run passbolt +passbolt_user: www-data diff --git a/roles/passbolt/tasks/main.yml b/roles/passbolt/tasks/main.yml new file mode 100644 index 0000000..e8db586 --- /dev/null +++ b/roles/passbolt/tasks/main.yml @@ -0,0 +1,35 @@ +--- +# See https://help.passbolt.com/hosting/install/ce/from-source.html + +- name: Clone passbolt project + git: + repo: "{{ passbolt_repo }}" + dest: "{{ passbolt_path }}" + version: "{{ passbolt_version }}" + become: true + become_user: "{{ passbolt_user }}" + +- name: Install passbolt dependencies + apt: + name: + - composer + - php-intl + - php-gnupg + - php-gd + state: present + update_cache: yes + register: apt_result + retries: 3 + until: apt_result is succeeded + +# Setup dependencies +- name: Install passbolt PHP dependencies + composer: + command: install + working_dir: "{{ passbolt_path }}" + no_dev: true + become: true + become_user: "{{ passbolt_user }}" + register: composer_result + retries: 3 + until: composer_result is succeeded