mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-09 21:48:32 +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:
|
||||
path: /usr/local/bin/composer
|
||||
register: composer_install_location_stat
|
||||
check_mode: false
|
||||
|
||||
- name: Download composer
|
||||
get_url:
|
||||
@@ -47,6 +48,12 @@
|
||||
owner: 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
|
||||
become: true
|
||||
become_user: www-data
|
||||
@@ -54,3 +61,29 @@
|
||||
command: create-project
|
||||
arguments: "typo3/cms-base-distribution:^12 atlantishq-cms"
|
||||
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