remplacement de SITE par config_ss_domain
[lhc/ansible.git] / tasks / config_nginx.yml
index cb833aa..3f74047 100644 (file)
@@ -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=
 - 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=
-  when: SITE != 'nuage' and template_site != 'http'
+  when: SITE != 'nuage' and template_site != 'http' and SITE != 'WP'
 
 - name: Recharger le service nginx
   ansible.builtin.service:
     name: nginx
     state: reloaded
-  when: SITE != 'nuage' and SITE != 'paheko' and SITE != 'gestion' and template_site == 'http'
+  when: SITE != 'nuage' and SITE != 'paheko' and SITE != 'WP' and template_site == 'http'