feat: configure php on typo3

This commit is contained in:
2023-01-16 17:15:20 +01:00
parent 62039fffa2
commit 269f2787b6
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
- name: restart php-fpm
systemd:
name: php8.1-fpm
state: restarted

View File

@@ -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