]> gitweb.hamatoma.de Git - ansknife.git/commitdiff
Improvements
authorHamatoma <author@hamatoma.de>
Tue, 20 May 2025 18:16:54 +0000 (20:16 +0200)
committerHamatoma <author@hamatoma.de>
Tue, 20 May 2025 18:16:54 +0000 (20:16 +0200)
playbooks.templates/i_40_php8.2.yaml
playbooks.templates/nginx_sites.yaml

index de20f1619e16e49fa6e24e9c3e1970a236d7180d..c7ce38be0ae181a04dcc98a00f09fcbca873ab31 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- name: Playbook to install and configure PHP (all versions from 7.4)
+- name: Playbook to install and configure PHP
   # optional facts:
   # php_version: the wanted version. Default: "8.2"
   hosts: all
index de6704d1a7bdf577cbe519370257b29b5acc9a72..46986b7700de5d5e4e0931030a8721875b19a512 100644 (file)
@@ -7,13 +7,21 @@
     - ../vars/webapps.yaml
   tasks:
     - name: Set the NGINX configuration files
-      copy:
+      ansible.builtin.copy:
         src: "../templates.local/nginx/sites/{{ item.webapp_name }}"
-        dest: "/etc/nginx/sites-available/"
+        dest: "/etc/nginx/sites-available/{{ item.webapp_name }}"
         owner: root
         group: root
         mode: 0644
       with_list: "{{ webapps_list }}"
+    - name: Build the symbolic links
+      ansible.builtin.file:
+        src: "../sites-available/{{ item.webapp_name }}"
+        dest: "/etc/nginx/sites-enabled/{{ item.webapp_name }}"
+        state: link
+        force: true
+        follow: false
+      with_list: "{{ webapps_list }}"
       notify:
         - reload nginx
   handlers:
@@ -21,5 +29,5 @@
       service:
         name: nginx
         state: reloaded
-        enabled: yes
+        enabled: true
  
\ No newline at end of file