diff options
author | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-02-04 01:23:43 -0500 |
---|---|---|
committer | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-02-04 01:52:13 -0500 |
commit | 0261e875679f1bf63c8d689da7fc7e014597885d (patch) | |
tree | 3f19cd74a0c1070944f75437f30b098d6ef2ffcb /roles/php/tasks | |
download | selfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.tar.gz selfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.zip |
initial commit
Diffstat (limited to 'roles/php/tasks')
-rw-r--r-- | roles/php/tasks/main.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/roles/php/tasks/main.yml b/roles/php/tasks/main.yml new file mode 100644 index 0000000..6505ec0 --- /dev/null +++ b/roles/php/tasks/main.yml @@ -0,0 +1,32 @@ +- name: install php + dnf: + name: '{{ php_packages[ansible_distribution_major_version] }}' + state: present + +# TODO: we should support multiple pools +- name: generate php configuration + template: + src: '{{ item[1:] }}.j2' + dest: '{{ item }}' + loop: + - /etc/php.ini + - /etc/php-fpm.conf + - /etc/php-fpm.d/www.conf + notify: restart php-fpm + +- name: create systemd override directory + file: + path: /etc/systemd/system/php-fpm.service.d + state: directory + +- name: create systemd override file + copy: + src: etc/systemd/system/php-fpm.service.d/override.conf + dest: /etc/systemd/system/php-fpm.service.d/override.conf + notify: restart php-fpm + register: php_fpm_systemd_unit + +- name: reload systemd daemon + systemd: + daemon_reload: yes + when: php_fpm_systemd_unit.changed |