+- name: Etckeeper commit if necessary
+ ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ SITE }}"
+
- name: Install required packages
ansible.builtin.apt:
name:
- php-cli
- php-imagick
- php-mbstring
+ - php-gnupg
state: present
register: php_install
- name: Bloc paheko_version
when: paheko_version is undefined
block:
- - name: Demande la version de nextcloud à installer
+ - name: Demande la version de paheko à installer
ansible.builtin.pause:
- prompt: "Quelle version de nextcloud doit être utilisé"
+ prompt: "Quelle version de paheko doit être utilisé"
echo: true
register: paheko_version_prompt
dest: "/home/sites/data/paheko/{{ paheko_version }}.tar.gz"
mode: '755' # or u=rwx,g=rx,o=rx
- - name: Extract downloaded nextcloud source
+ - name: Extract downloaded paheko source
become: true
become_user: www-data
ansible.builtin.unarchive:
ansible.builtin.copy:
src: "/home/sites/data/paheko/paheko-{{ paheko_version }}/"
dest: "/home/sites/data/paheko/{{ paheko_version }}"
- remote_src: true # because the config file is already in the nextcloud_tmp_path
+ remote_src: true # because the config file is already on the paheko path
mode: preserve
- - name: Deleted downloaded nextcloud files
+ - name: Deleted downloaded paheko files
become: true
ansible.builtin.file:
path: "{{ item }}"
path: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/"
state: directory
owner: "php_{{ SIGLE }}_{{ SITE }}"
- group: "php_{{ SIGLE }}_{{ SITE }}"
- mode: '644'
+ group: "site_{{ SIGLE }}_{{ SITE }}"
+ mode: '2750'
recurse: true
- name: Boucle d'ajout du user php dans plusieurs groupe
# dest: "/usr/share/garradin/www/admin/static/favicon{{ icon | splitext | last }}"
# when: favicon is defined
-- name: Recharger PHP service
+- name: Recharger PHP et nginx
ansible.builtin.service:
name: "{{ item }}"
state: reloaded