From bf3037007914fa62d66df51e5095ede36e30ff73 Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 7 Feb 2023 17:31:59 +0100 Subject: [PATCH] Rename files --- tasks/php.yml | 43 ++++++++++++----------- templates/{sao-fpm.ini.j2 => php-fpm.ini} | 0 templates/{sao.ini.j2 => php.ini} | 0 3 files changed, 23 insertions(+), 20 deletions(-) rename templates/{sao-fpm.ini.j2 => php-fpm.ini} (100%) rename templates/{sao.ini.j2 => php.ini} (100%) diff --git a/tasks/php.yml b/tasks/php.yml index 1a1be51..9a02c93 100644 --- a/tasks/php.yml +++ b/tasks/php.yml @@ -1,42 +1,45 @@ --- -- name: "PHP | Kopiere angepasste Konfigurationsdateien" +- name: "PHP | Copy custom PHP configuration" ansible.builtin.template: - src: "{{ item }}.j2" - dest: "/etc/php/{{ php_version.stdout }}/mods-available/{{ item }}" + src: php.ini + dest: "/etc/php/{{ php_version.stdout }}/mods-available/{{ inventory_hostname }}.ini" mode: 0644 - loop: - - sao.ini - - sao-fpm.ini -- name: "PHP | Verlinke Apache Konfiguration" +- name: "PHP | Copy custom PHP-FPM configuration" + ansible.builtin.template: + src: php-fpm.ini + dest: "/etc/php/{{ php_version.stdout }}/mods-available/{{ inventory_hostname }}-fpm.ini" + mode: 0644 + +- name: "PHP | Enable PHP configuration for mod_php" ansible.builtin.file: - src: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini" - dest: "/etc/php/{{ php_version.stdout }}/apache2/conf.d/30-sao.ini" + src: "/etc/php/{{ php_version.stdout }}/mods-available/{{ inventory_hostname }}.ini" + dest: "/etc/php/{{ php_version.stdout }}/apache2/conf.d/30-{{ inventory_hostname }}.ini" state: link when: "'libapache2-mod-php{{ php_version.stdout }}' in ansible_facts.packages" notify: reload apache2 -- name: "PHP | Verlinke cli Konfiguration" +- name: "PHP | Enable PHP cli configuration" ansible.builtin.file: - src: "/etc/php/{{ php_version.stdout }}/mods-available/sao.ini" - dest: "/etc/php/{{ php_version.stdout }}/cli/conf.d/30-sao.ini" + src: "/etc/php/{{ php_version.stdout }}/mods-available/{{ inventory_hostname }}.ini" + dest: "/etc/php/{{ php_version.stdout }}/cli/conf.d/30-{{ inventory_hostname }}.ini" state: link -- name: "PHP | Erstelle Log-Verzeichnis" +- name: "PHP | Create log directory" ansible.builtin.file: path: "{{ php_fpm_log_dir }}" state: directory mode: 0755 -- name: "PHP | Verlinke FPM-Konfiguration" +- name: "PHP | Enable PGP FPM configuration" ansible.builtin.file: - src: "/etc/php/{{ php_version.stdout }}/mods-available/sao-fpm.ini" - dest: "/etc/php/{{ php_version.stdout }}/fpm/conf.d/30-sao-fpm.ini" + src: "/etc/php/{{ php_version.stdout }}/mods-available/{{ inventory_hostname }}-fpm.ini" + dest: "/etc/php/{{ php_version.stdout }}/fpm/conf.d/30-{{ inventory_hostname }}-fpm.ini" state: link when: "'php-fpm' in ansible_facts.packages" notify: reload php-fpm -- name: "PHP | Kopiere Template für PHP-FPM systemd socket" +- name: "PHP | Copy template for PHP-FPM systemd socket" ansible.builtin.copy: src: systemd/php-fpm@.socket dest: /etc/systemd/system/php-fpm@.socket @@ -46,9 +49,9 @@ - stop php-fpm-service - start php-fpm-socket -- name: "PHP | Kopiere Template für PHP-FPM systemd service" +- name: "PHP | Copy template for PHP-FPM systemd service" ansible.builtin.template: - src: systemd/php-fpm@.service.j2 + src: systemd/php-fpm@.service dest: /etc/systemd/system/php-fpm@.service mode: 0644 notify: @@ -56,7 +59,7 @@ - stop php-fpm-service - start php-fpm-socket -- name: "PHP | Erstelle override-Verzeichnis" +- name: "PHP | Create systemd override directory" ansible.builtin.file: path: /etc/systemd/system/php-fpm@.service.d state: directory diff --git a/templates/sao-fpm.ini.j2 b/templates/php-fpm.ini similarity index 100% rename from templates/sao-fpm.ini.j2 rename to templates/php-fpm.ini diff --git a/templates/sao.ini.j2 b/templates/php.ini similarity index 100% rename from templates/sao.ini.j2 rename to templates/php.ini