Changeset - a932640479cf
[Not reviewed]
0 2 0
Branko Majic (branko) - 4 years ago 2020-05-07 18:00:36
branko@majic.rs
MAR-152: Fix idempotence issues with web_server role:

- Reload configuration of PHP-FPM to ensure changes are picked-up.
- Install base packages for PHP applications prior to creating the
directory containing unix socket files (so the package installation
would not change them back).
2 files changed with 10 insertions and 5 deletions:
0 comments (0 inline, 0 general)
roles/web_server/handlers/main.yml
Show inline comments
 
---
 

	
 
- name: Reload systemd
 
  systemd:
 
    daemon_reload: true
 

	
 
- name: Restart nginx
 
  service:
 
    name: nginx
roles/web_server/tasks/main.yml
Show inline comments
 
@@ -136,6 +136,11 @@
 
      - virtualenvwrapper
 
    state: present
 

	
 
- name: Install base packages for PHP web applications
 
  apt:
 
    name: "{{ php_fpm_package_name }}"
 
    state: present
 

	
 
- name: Create directories for storing per-site socket files
 
  file:
 
    path: "/run/{{ item }}"
 
@@ -160,11 +165,6 @@
 
    - socket_dir: php
 
      tmpfiles_d: "{{ php_fpm_service_name }}.conf"
 

	
 
- name: Install base packages for PHP web applications
 
  apt:
 
    name: "{{ php_fpm_package_name }}"
 
    state: present
 

	
 
- name: Create directory for storing PHP-FPM service configuration overrides
 
  file:
 
    path: "/etc/systemd/system/{{ php_fpm_service_name }}.service.d/"
 
@@ -181,6 +181,7 @@
 
    group: root
 
    mode: 0644
 
  notify:
 
    - Reload systemd
 
    - Restart PHP-FPM
 

	
 
- name: Enable service used for running PHP web applications
0 comments (0 inline, 0 general)