ansible-roles/lxc-php/tasks/umask.yml
William Hirigoyen b1138c07ee
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
lxc-php: Fix register instruction in wrong order and indentation
2022-11-02 11:10:56 +01:00

32 lines
1.1 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Ajoute UMask=0007 à l'unité systemd PHP-FPM du conteneur LXC
# dans /etc/systemd/system/phpX.X-fpm.service.d/evolinux.conf
---
- name: "Définis le chemin du système de fichiers du conteneur LXC."
set_fact:
lxc_rootfs_path: "/var/lib/lxc/{{ lxc_php_version }}/rootfs"
- name: "Crée des répertoires (si absents) pour surcharger la config des services PHP dans les conteneurs LXC."
ansible.builtin.file:
path: "{{ lxc_rootfs_path }}/etc/systemd/system/{{ lxc_php_services[lxc_php_version] }}.d"
state: directory
register: systemd_path
- name: "[Service] est présent dans la surchage des services PHP-FPM des conteneurs LXC."
ansible.builtin.lineinfile:
path: "{{ systemd_path.path }}/evolinux.conf"
regex: "\\[Service\\]"
line: "[Service]"
create: yes
- name: "UMask=0007 est présent dans la surchage des services PHP-FPM des conteneurs LXC."
ansible.builtin.lineinfile:
path: "{{ systemd_path.path }}/evolinux.conf"
regex: "^UMask="
line: "UMask=0007"
insertafter: "\\[Service\\]"
notify:
- "Daemon reload"
- "Restart PHP-FPM"