X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tasks%2Fconfig_paheko.yml;h=48f1c96f399a7861cd82bc213e631d10ff380cfb;hb=5f7ed8e1233e5b2bb33ac343113d3fa5bfe77ec3;hp=904aff5f71ed30a64d93b83a10e7eecf4ca8fe4a;hpb=0e7e1f059f943f6617400cc32d155d73b4b4b9a3;p=lhc%2Fansible.git diff --git a/tasks/config_paheko.yml b/tasks/config_paheko.yml index 904aff5..48f1c96 100644 --- a/tasks/config_paheko.yml +++ b/tasks/config_paheko.yml @@ -1,3 +1,6 @@ +- 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: @@ -7,6 +10,7 @@ - php-cli - php-imagick - php-mbstring + - php-gnupg state: present register: php_install @@ -28,9 +32,9 @@ - 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 @@ -72,7 +76,7 @@ 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: @@ -87,10 +91,10 @@ 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 }}" @@ -112,8 +116,8 @@ 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 @@ -136,7 +140,7 @@ # 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