From d9743190e260a4dda455579bbf6e893fde310c58 Mon Sep 17 00:00:00 2001 From: rominique Date: Tue, 18 Jun 2024 01:42:50 +0200 Subject: [PATCH] remplacement de SITE par config_ss_domain --- creation_nouveau_site.yml | 10 +++++----- tasks/config_WP.yml | 13 ++++++------- tasks/config_backup.yml | 6 +++--- tasks/config_mariadb.yml | 12 ++++++------ tasks/config_nginx.yml | 8 ++++---- tasks/config_nuage.yml | 22 +++++++++++----------- tasks/config_options_www.yml | 3 ++- tasks/config_paheko.yml | 12 ++++++------ tasks/config_pool_php.yml | 22 +++++++++++----------- tasks/config_postgres.yml | 22 +++++++++++----------- tasks/config_sftp.yml | 10 +++++----- tasks/config_www.yml | 14 +++++++------- templates/nextcloud_install_config.j2 | 2 +- templates/nextcloud_sigle_config.j2 | 2 +- templates/nginx_WP_server.j2 | 18 +++++++++--------- templates/nginx_http_server.j2 | 4 ++-- templates/nginx_nuage_server.j2 | 26 +++++++++++++------------- templates/nginx_paheko_common.j2 | 4 ++-- templates/nginx_paheko_server.j2 | 16 ++++++++-------- templates/nginx_www_common.j2 | 2 +- templates/nginx_www_server.j2 | 16 ++++++++-------- templates/php_WP_conf.j2 | 10 +++++----- templates/php_gestion_conf.j2 | 10 +++++----- templates/php_paheko_conf.j2 | 10 +++++----- templates/wp-config.php.j2 | 6 +++--- 25 files changed, 140 insertions(+), 140 deletions(-) diff --git a/creation_nouveau_site.yml b/creation_nouveau_site.yml index 145d82f..b9029e0 100644 --- a/creation_nouveau_site.yml +++ b/creation_nouveau_site.yml @@ -1,7 +1,7 @@ # commande pour lancer le playbook: ansible-playbook creation_nouveau_site.yml # attention - Par défaut ce scipt se lancer vers ligatures -# pour ne jouer que la partie permettant de générer le certificat SSL pour le HTTPS lancer la commance ci-dessous: +# pour ne jouer que la partie permettant de générer le certificat SSL pour le HTTPS lancer la commance ci-dessous (attention il faut recharger nginx manuellement à la fin): # ansible-playbook creation_nouveau_site.yml --tags "https" - name: Promp pour définir les variables du nouveau ite @@ -54,12 +54,12 @@ tasks: - - name: Inclure la configuration d'un site web basique - ansible.builtin.include_tasks: tasks/config_www.yml - - name: Inclure les configurations optionnelles d'un site www ansible.builtin.include_tasks: tasks/config_options_www.yml - when: SITE != 'nuage' + tags: https + + - name: Inclure la configuration d'un site web basique + ansible.builtin.include_tasks: tasks/config_www.yml - name: Inclure la configuration nginx ansible.builtin.include_tasks: tasks/config_nginx.yml diff --git a/tasks/config_WP.yml b/tasks/config_WP.yml index 235cdbb..684d161 100644 --- a/tasks/config_WP.yml +++ b/tasks/config_WP.yml @@ -1,25 +1,24 @@ - - name: Copie des fichiers sources WP dans le home du nouveau site ansible.builtin.copy: src: "/home/sites/data/wordpress/" - dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/" + dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/" remote_src: true # because the copy is from remote host to remote host mode: '754' # or 'u=rwx,g=rx,o=r' - owner: "php_{{ SIGLE }}_{{ SITE }}" - group: "site_{{ SIGLE }}_{{ SITE }}" + owner: "php_{{ SIGLE }}_{{ config_ss_domain }}" + group: "site_{{ SIGLE }}_{{ config_ss_domain }}" - name: Créer les fichiers spécifiques wp ansible.builtin.template: src: "templates/{{ item.src }}" - dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/{{ item.dest }}" + dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/{{ item.dest }}" owner: "{{ item.owner }}" group: "{{ item.group }}" mode: "{{ item.mode }}" loop: - src: "wp-config.php.j2" dest: "wp-config.php" - owner: "php_{{ SIGLE }}_{{ SITE }}" - group: "site_{{ SIGLE }}_{{ SITE }}" + owner: "php_{{ SIGLE }}_{{ config_ss_domain }}" + group: "site_{{ SIGLE }}_{{ config_ss_domain }}" mode: '640' - name: Recharger PHP et nginx diff --git a/tasks/config_backup.yml b/tasks/config_backup.yml index da885b2..03b2970 100644 --- a/tasks/config_backup.yml +++ b/tasks/config_backup.yml @@ -8,8 +8,8 @@ backup: true register: presence_sigle loop: - - " - /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/config" - - " - /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/data" + - " - /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/config" + - " - /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/data" when: SITE == 'nuage' - name: Mise à jour de la conf de borgmatic pour le backup d'un site non nuage @@ -22,5 +22,5 @@ backup: true register: presence_sigle loop: - - " - /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + - " - /home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" when: SITE != 'nuage' diff --git a/tasks/config_mariadb.yml b/tasks/config_mariadb.yml index 831fc66..c2efe44 100644 --- a/tasks/config_mariadb.yml +++ b/tasks/config_mariadb.yml @@ -1,5 +1,5 @@ - name: Etckeeper commit if necessary - ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ SITE }}" + ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ config_ss_domain }}" ignore_errors: true - name: Install ansible mysql required packages @@ -9,23 +9,23 @@ - name: Boucle d'ajout du user php dans plusieurs groupe ansible.builtin.user: - name: "php_{{ SIGLE }}_{{ SITE }}" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" groups: "{{ item }}" append: true loop: - mysql - - "site_{{ SIGLE }}_{{ SITE }}" + - "site_{{ SIGLE }}_{{ config_ss_domain }}" - name: Création de la nouvelle bdd Mariadb community.mysql.mysql_db: - name: "php_{{ SIGLE }}_{{ SITE }}" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" state: present login_unix_socket: /run/mysqld/mysqld.sock encoding: utf8mb4 # pour WP - name: Créer le user mysql community.mysql.mysql_user: - name: "php_{{ SIGLE }}_{{ SITE }}" - priv: "php_{{ SIGLE }}_{{ SITE }}.*:ALL" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" + priv: "php_{{ SIGLE }}_{{ config_ss_domain }}.*:ALL" state: present login_unix_socket: /run/mysqld/mysqld.sock diff --git a/tasks/config_nginx.yml b/tasks/config_nginx.yml index 0c61275..3f74047 100644 --- a/tasks/config_nginx.yml +++ b/tasks/config_nginx.yml @@ -8,7 +8,7 @@ loop_control: label: "{{ item.path }}" loop: - - path: "/etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + - path: "/etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" state: directory owner: 'root' group: 'root' @@ -18,7 +18,7 @@ owner: 'log_sites' group: 'log_sites' mode: '755' - - path: "/home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + - path: "/home/sites/log/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" state: directory owner: 'log_sites' group: 'log_sites' @@ -27,7 +27,7 @@ - name: Création de la conf server nginx ansible.builtin.template: src: "templates/nginx_{{ template_site }}_server.j2" - dest: "/etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/server.conf" + dest: "/etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/server.conf" owner: "root" group: "root" mode: '640' # or u=rwx,g=r,o= @@ -35,7 +35,7 @@ - name: Création de la conf common nginx ansible.builtin.template: src: "templates/nginx_{{ template_site }}_common.j2" - dest: "/etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/common.conf" + dest: "/etc/nginx/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/common.conf" owner: "root" group: "root" mode: '640' # or u=rwx,g=r,o= diff --git a/tasks/config_nuage.yml b/tasks/config_nuage.yml index f0678ec..ffb8ab7 100644 --- a/tasks/config_nuage.yml +++ b/tasks/config_nuage.yml @@ -1,5 +1,5 @@ - name: Etckeeper commit if necessary - ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ SITE }}" + ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ config_ss_domain }}" ignore_errors: true - name: Install required packages @@ -37,14 +37,14 @@ - name: Boucle d'ajout du user php dans plusieurs groupe ansible.builtin.user: - name: "php_{{ SIGLE }}_{{ SITE }}" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" groups: "{{ item }}" append: true loop: - nextcloud - postgres-data - redis - - "site_{{ SIGLE }}_{{ SITE }}" + - "site_{{ SIGLE }}_{{ config_ss_domain }}" - name: Bloc nouvelle version nextcloud when: nouvelle_version is undefined @@ -119,11 +119,11 @@ community.postgresql.postgresql_pg_hba: dest: "/etc/postgresql/{{ postgres_version }}/main/pg_hba.conf" contype: local - users: "php_{{ SIGLE }}_{{ SITE }}" - databases: "php_{{ SIGLE }}_{{ SITE }}" + users: "php_{{ SIGLE }}_{{ config_ss_domain }}" + databases: "php_{{ SIGLE }}_{{ config_ss_domain }}" method: peer keep_comments_at_rules: true - comment: "autoriser le user php_{{ SIGLE }}_{{ SITE }} à se connecter à la bdd du meme nom" + comment: "autoriser le user php_{{ SIGLE }}_{{ config_ss_domain }} à se connecter à la bdd du meme nom" - name: Boucle création des répertoires app, config et data nextcloud ansible.builtin.file: @@ -207,13 +207,13 @@ ansible.builtin.command: > ./console maintenance:install --database='pgsql' - --database-name="php_{{ SIGLE }}_{{ SITE }}" - --database-user="php_{{ SIGLE }}_{{ SITE }}" + --database-name="php_{{ SIGLE }}_{{ config_ss_domain }}" + --database-user="php_{{ SIGLE }}_{{ config_ss_domain }}" --database-host="/var/run/postgresql/" --database-pass="" --admin-user='admin' --admin-pass='ckoideja' - --data-dir="/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/data/" + --data-dir="/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/data/" args: chdir: "{{ nextcloud_webroot }}" register: install_result @@ -315,9 +315,9 @@ - name: Creation d'un fichier cron pour /etc/cron.d ansible.builtin.cron: - name: "nextcloud {{ SIGLE }}_{{ SITE }} taches d'arriere plan toutes les 5 mins" + name: "nextcloud {{ SIGLE }}_{{ config_ss_domain }} taches d'arriere plan toutes les 5 mins" minute: "*/5" - user: "php_{{ SIGLE }}_{{ SITE }}" + user: "php_{{ SIGLE }}_{{ config_ss_domain }}" job: "{{ nextcloud_webroot }}/cron" - name: Recharger plusieurs services diff --git a/tasks/config_options_www.yml b/tasks/config_options_www.yml index b55a387..93fdb51 100644 --- a/tasks/config_options_www.yml +++ b/tasks/config_options_www.yml @@ -1,4 +1,5 @@ - name: Bloc demande sous-domaine + tags: https block: - name: Demande sous-domaine @@ -12,7 +13,7 @@ config_ss_domain: "{{ config_ss_domain_promp.user_input | default(SITE) }}" - name: Bloc demande des autres options - when: SITE != 'paheko' # and SITE != 'WP' + when: SITE != 'paheko' or SITE != 'nuage' # and SITE != 'WP' block: - name: Demande php diff --git a/tasks/config_paheko.yml b/tasks/config_paheko.yml index 2c5748d..efc748b 100644 --- a/tasks/config_paheko.yml +++ b/tasks/config_paheko.yml @@ -1,5 +1,5 @@ - name: Etckeeper commit if necessary - ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ SITE }}" + ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ config_ss_domain }}" - name: Install required packages ansible.builtin.apt: @@ -95,19 +95,19 @@ - name: Copie la source paheko vers le home du site become: true -# become_user: "php_{{ SIGLE }}_{{ SITE }}" +# become_user: "php_{{ SIGLE }}_{{ config_ss_domain }}" ansible.builtin.copy: src: "/home/sites/data/paheko/{{ paheko_version }}/" - dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" remote_src: true # because the config file is already in the nextcloud_tmp_path mode: '2750' - name: Modification du propriétaire group et droits du dossier ansible.builtin.file: - path: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/" + path: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/" state: directory - owner: "php_{{ SIGLE }}_{{ SITE }}" - group: "site_{{ SIGLE }}_{{ SITE }}" + owner: "php_{{ SIGLE }}_{{ config_ss_domain }}" + group: "site_{{ SIGLE }}_{{ config_ss_domain }}" mode: '2750' recurse: true diff --git a/tasks/config_pool_php.yml b/tasks/config_pool_php.yml index cf1c432..23173eb 100644 --- a/tasks/config_pool_php.yml +++ b/tasks/config_pool_php.yml @@ -1,17 +1,17 @@ - name: Ajout de l'utilisateur php_SIGLE_SITE ansible.builtin.user: - name: "php_{{ SIGLE }}_{{ SITE }}" - home: "/etc/php/{{ php_version }}/fpm/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" + home: "/etc/php/{{ php_version }}/fpm/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" shell: /bin/false system: true append: true create_home: false password: '!' -# group: "php_{{ SIGLE }}_{{ SITE }}" +# group: "php_{{ SIGLE }}_{{ config_ss_domain }}" - name: Boucle d'ajout du user php dans plusieurs groupe ansible.builtin.user: - name: "php_{{ SIGLE }}_{{ SITE }}" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" groups: "{{ item }}" append: true loop: @@ -34,13 +34,13 @@ mode: '1751' - path: "/home/sites/log/php/fpm/{{ TLD }}/{{ DOMAIN }}" state: directory - owner: "php_{{ SIGLE }}_{{ SITE }}" - group: "php_{{ SIGLE }}_{{ SITE }}" + owner: "php_{{ SIGLE }}_{{ config_ss_domain }}" + group: "php_{{ SIGLE }}_{{ config_ss_domain }}" mode: '1751' - - path: "/home/sites/log/php/fpm/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + - path: "/home/sites/log/php/fpm/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" state: directory - owner: "php_{{ SIGLE }}_{{ SITE }}" - group: "php_{{ SIGLE }}_{{ SITE }}" + owner: "php_{{ SIGLE }}_{{ config_ss_domain }}" + group: "php_{{ SIGLE }}_{{ config_ss_domain }}" mode: '750' - name: Boucle création ou modifications des répertoires config d'un pool php @@ -53,7 +53,7 @@ loop_control: label: "{{ item.path }}" loop: - - path: "/etc/php/{{ php_version }}/fpm/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + - path: "/etc/php/{{ php_version }}/fpm/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" state: directory # If directory, all intermediate subdirectories will be created if they do not exist. owner: 'root' group: 'root' @@ -67,7 +67,7 @@ - name: Création de la conf du pool php ansible.builtin.template: src: "templates/php_{{ SITE }}_conf.j2" - dest: "/etc/php/{{ php_version }}/fpm/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/php-fpm.conf" + dest: "/etc/php/{{ php_version }}/fpm/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/php-fpm.conf" owner: "root" group: "root" mode: '640' # or u=rwx,g=r,o= diff --git a/tasks/config_postgres.yml b/tasks/config_postgres.yml index 06652ce..fe6a511 100644 --- a/tasks/config_postgres.yml +++ b/tasks/config_postgres.yml @@ -1,5 +1,5 @@ - name: Etckeeper commit if necessary - ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ SITE }}" + ansible.builtin.command: etckeeper commit "commit by ansible because installing {{ DOMAIN }}/{{ config_ss_domain }}" ignore_errors: true - name: Install required packages @@ -36,14 +36,14 @@ - name: Boucle d'ajout du user php dans plusieurs groupe ansible.builtin.user: - name: "php_{{ SIGLE }}_{{ SITE }}" + name: "php_{{ SIGLE }}_{{ config_ss_domain }}" groups: "{{ item }}" append: true loop: - nextcloud - postgres-data - redis - - "site_{{ SIGLE }}_{{ SITE }}" + - "site_{{ SIGLE }}_{{ config_ss_domain }}" - name: Bloc nouvelle version nextcloud when: nouvelle_version is undefined @@ -118,11 +118,11 @@ community.postgresql.postgresql_pg_hba: dest: "/etc/postgresql/{{ postgres_version }}/main/pg_hba.conf" contype: local - users: "php_{{ SIGLE }}_{{ SITE }}" - databases: "php_{{ SIGLE }}_{{ SITE }}" + users: "php_{{ SIGLE }}_{{ config_ss_domain }}" + databases: "php_{{ SIGLE }}_{{ config_ss_domain }}" method: peer keep_comments_at_rules: true - comment: "autoriser le user php_{{ SIGLE }}_{{ SITE }} à se connecter à la bdd du meme nom" + comment: "autoriser le user php_{{ SIGLE }}_{{ config_ss_domain }} à se connecter à la bdd du meme nom" - name: Boucle création des répertoires app, config et data nextcloud ansible.builtin.file: @@ -206,13 +206,13 @@ ansible.builtin.command: > ./console maintenance:install --database='pgsql' - --database-name="php_{{ SIGLE }}_{{ SITE }}" - --database-user="php_{{ SIGLE }}_{{ SITE }}" + --database-name="php_{{ SIGLE }}_{{ config_ss_domain }}" + --database-user="php_{{ SIGLE }}_{{ config_ss_domain }}" --database-host="/var/run/postgresql/" --database-pass="" --admin-user='admin' --admin-pass='ckoideja' - --data-dir="/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}/data/" + --data-dir="/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}/data/" args: chdir: "{{ nextcloud_webroot }}" register: install_result @@ -314,9 +314,9 @@ - name: Creation d'un fichier cron pour /etc/cron.d ansible.builtin.cron: - name: "nextcloud {{ SIGLE }}_{{ SITE }} taches d'arriere plan toutes les 5 mins" + name: "nextcloud {{ SIGLE }}_{{ config_ss_domain }} taches d'arriere plan toutes les 5 mins" minute: "*/5" - user: "php_{{ SIGLE }}_{{ SITE }}" + user: "php_{{ SIGLE }}_{{ config_ss_domain }}" job: "{{ nextcloud_webroot }}/cron" - name: Recharger plusieurs services diff --git a/tasks/config_sftp.yml b/tasks/config_sftp.yml index 2b8c446..ea023c0 100644 --- a/tasks/config_sftp.yml +++ b/tasks/config_sftp.yml @@ -1,6 +1,6 @@ - name: Ajout de l'utilisateur site_SIGLE_SITE dans le group sftponly et modification du home ansible.builtin.user: - name: "site_{{ SIGLE }}_{{ SITE }}" + name: "site_{{ SIGLE }}_{{ config_ss_domain }}" home: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}" shell: /bin/false groups: sftponly @@ -24,16 +24,16 @@ mode: '2751' - path: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/.ssh" state: directory - owner: "site_{{ SIGLE }}_{{ SITE }}" - group: "site_{{ SIGLE }}_{{ SITE }}" + owner: "site_{{ SIGLE }}_{{ config_ss_domain }}" + group: "site_{{ SIGLE }}_{{ config_ss_domain }}" mode: '2700' - name: Création du fichier authorized_keys ansible.builtin.template: src: "templates/authorized_keys.j2" dest: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/.ssh/authorized_keys" - owner: "site_{{ SIGLE }}_{{ SITE }}" - group: "site_{{ SIGLE }}_{{ SITE }}" + owner: "site_{{ SIGLE }}_{{ config_ss_domain }}" + group: "site_{{ SIGLE }}_{{ config_ss_domain }}" mode: '600' # verif le serveur openssh est bien config et sinon le faire? + reload diff --git a/tasks/config_www.yml b/tasks/config_www.yml index c1a4b20..b5ac3f4 100644 --- a/tasks/config_www.yml +++ b/tasks/config_www.yml @@ -1,7 +1,7 @@ - name: Ajout de l'utilisateur site_SIGLE_SITE ansible.builtin.user: - name: "site_{{ SIGLE }}_{{ SITE }}" - home: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + name: "site_{{ SIGLE }}_{{ config_ss_domain }}" + home: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" shell: /bin/false groups: www-data system: true @@ -12,7 +12,7 @@ - name: Boucle d'ajout d'user dans le groupe site_SIGLE_SITE ansible.builtin.user: name: "{{ item }}" - groups: "site_{{ SIGLE }}_{{ SITE }}" + groups: "site_{{ SIGLE }}_{{ config_ss_domain }}" append: true loop: - 'www-data' @@ -25,8 +25,8 @@ owner: "{{ item.owner }}" group: "{{ item.group }}" mode: "{{ item.mode }}" - vars: - concat: "site_{{ SIGLE }}_{{ SITE }}" + vars: + concat: "site_{{ SIGLE }}_{{ config_ss_domain }}" loop_control: label: "{{ item.path }}" loop: @@ -40,8 +40,8 @@ owner: 'root' group: 'www-data' mode: '2751' - - path: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ SITE }}" + - path: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/{{ config_ss_domain }}" state: directory owner: "{{ ( SITE in ['www','WP'] ) | ternary ( concat , 'root' ) }}" - group: "site_{{ SIGLE }}_{{ SITE }}" + group: "site_{{ SIGLE }}_{{ config_ss_domain }}" mode: '2750' diff --git a/templates/nextcloud_install_config.j2 b/templates/nextcloud_install_config.j2 index 40dcc52..06e3555 100644 --- a/templates/nextcloud_install_config.j2 +++ b/templates/nextcloud_install_config.j2 @@ -1,5 +1,5 @@