ansible-roles/lxc-php/tasks/umask.yml
David Prevot 057224fb38
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
Skip task in check_mode
2022-11-25 15:56:19 +01:00

33 lines
1.1 KiB
YAML
Raw Permalink 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\\]"
when: not ansible_check_mode
notify:
- "Daemon reload"
- "Restart PHP-FPM"