mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 09:08:33 +01:00
feat: configure php on typo3
This commit is contained in:
4
roles/typo3-cms/handlers/main.yaml
Normal file
4
roles/typo3-cms/handlers/main.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- name: restart php-fpm
|
||||||
|
systemd:
|
||||||
|
name: php8.1-fpm
|
||||||
|
state: restarted
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
stat:
|
stat:
|
||||||
path: /usr/local/bin/composer
|
path: /usr/local/bin/composer
|
||||||
register: composer_install_location_stat
|
register: composer_install_location_stat
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: Download composer
|
- name: Download composer
|
||||||
get_url:
|
get_url:
|
||||||
@@ -47,6 +48,12 @@
|
|||||||
owner: www-data
|
owner: www-data
|
||||||
group: www-data
|
group: www-data
|
||||||
|
|
||||||
|
- name: Check project exists
|
||||||
|
stat:
|
||||||
|
path: /var/www/atlantishq-cms/
|
||||||
|
register: project_stat
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: Install typo3 cms
|
- name: Install typo3 cms
|
||||||
become: true
|
become: true
|
||||||
become_user: www-data
|
become_user: www-data
|
||||||
@@ -54,3 +61,29 @@
|
|||||||
command: create-project
|
command: create-project
|
||||||
arguments: "typo3/cms-base-distribution:^12 atlantishq-cms"
|
arguments: "typo3/cms-base-distribution:^12 atlantishq-cms"
|
||||||
working_dir: /var/www/
|
working_dir: /var/www/
|
||||||
|
when: not project_stat.stat.exists
|
||||||
|
|
||||||
|
- name: Install php-fpm
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- php-fpm
|
||||||
|
|
||||||
|
- name: Configure php-fpm listen
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
regex: ^listen = .*$
|
||||||
|
line: listen = 0.0.0.0:8080
|
||||||
|
|
||||||
|
- name: Configure php-fpm listen allowed clients
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
regex: ^listen = .*$
|
||||||
|
line: listen = 0.0.0.0:8080
|
||||||
|
notify: restart php-fpm
|
||||||
|
|
||||||
|
- name: Configure php-fpm listen allowed clients
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/php/8.1/fpm/pool.d/www.conf
|
||||||
|
regex: ^;*listen.allowed_clients = .*$
|
||||||
|
line: listen.allowed_clients = 192.168.122.1
|
||||||
|
notify: restart php-fpm
|
||||||
|
|||||||
Reference in New Issue
Block a user