From 51adec9ca8a94cde1a83891656759ceb59694218 Mon Sep 17 00:00:00 2001 From: Hamatoma Date: Tue, 20 May 2025 20:16:54 +0200 Subject: [PATCH] Improvements --- playbooks.templates/i_40_php8.2.yaml | 2 +- playbooks.templates/nginx_sites.yaml | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/playbooks.templates/i_40_php8.2.yaml b/playbooks.templates/i_40_php8.2.yaml index de20f16..c7ce38b 100644 --- a/playbooks.templates/i_40_php8.2.yaml +++ b/playbooks.templates/i_40_php8.2.yaml @@ -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 diff --git a/playbooks.templates/nginx_sites.yaml b/playbooks.templates/nginx_sites.yaml index de6704d..46986b7 100644 --- a/playbooks.templates/nginx_sites.yaml +++ b/playbooks.templates/nginx_sites.yaml @@ -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 -- 2.39.5