initial commit
This commit is contained in:
parent
c3b1ce9466
commit
486772da13
3
defaults/main.yml
Normal file
3
defaults/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
php_sapi: fpm
|
||||||
|
php_modules: []
|
5
handlers/main.yml
Normal file
5
handlers/main.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: restart php-fpm
|
||||||
|
systemd_service:
|
||||||
|
name: php{{ php_version }}-fpm
|
||||||
|
state: restarted
|
20
tasks/install.yml
Normal file
20
tasks/install.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
- name: php | installing php and modules
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- php{{ php_version }}-fpm
|
||||||
|
- php{{ php_version }}-common
|
||||||
|
- php{{ php_version }}-cli
|
||||||
|
- php{{ php_version }}-curl
|
||||||
|
- php{{ php_version }}-opcache
|
||||||
|
state: present
|
||||||
|
notify:
|
||||||
|
- restart php-fpm
|
||||||
|
|
||||||
|
- name: php | install extra modules
|
||||||
|
apt:
|
||||||
|
name: '{{ php_modules | list }}'
|
||||||
|
state: present
|
||||||
|
force: yes
|
||||||
|
notify:
|
||||||
|
- restart php-fpm
|
6
tasks/main.yml
Normal file
6
tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: php | requirements
|
||||||
|
include_tasks: requirements.yml
|
||||||
|
|
||||||
|
- name: php | installation
|
||||||
|
include_tasks: install.yml
|
26
tasks/requirements.yml
Normal file
26
tasks/requirements.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
- name: php | apt update cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 86400
|
||||||
|
|
||||||
|
- name: php | install requirements
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- apt-transport-https
|
||||||
|
- lsb-release
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: php | add sury key
|
||||||
|
apt_key:
|
||||||
|
url: https://packages.sury.org/php/apt.gpg
|
||||||
|
keyring: /etc/apt/trusted.gpg.d/php.gpg
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: php | add sury repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main
|
||||||
|
state: present
|
||||||
|
filename: php-sury
|
Loading…
x
Reference in New Issue
Block a user