-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtnp71.yml
42 lines (38 loc) · 1.04 KB
/
tnp71.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- hosts: all
gather_facts: False
vars:
- php_ini_path_list: "{{ ansible_local.php.ini_path_list|default([]) }}"
- php_version: "{{ ansible_local.php.version|default(7.1) }}"
pre_tasks:
- name: 'Install python if not installed'
raw: "sh -c 'test -e /usr/bin/python || (apt -yqq update && apt install -yqq python-minimal)'"
environment:
DEBIAN_FRONTEND: noninteractive
- name: 'Installing facts.d'
copy:
src: facts.d
dest: /etc/ansible/
owner: root
mode: u=rwx,g=rx,o=rx
- name: Gathering facts
setup:
- name: 'Printing php_version'
debug: var=php_version
- name: 'Printing php_ini_path_list'
debug: var=php_ini_path_list
roles:
- roles/tools
- roles/nginx
- roles/traefik
- roles/php-base
- roles/php-fpm
- roles/php-config
- roles/composer
- roles/nodejs
- roles/swap
post_tasks:
- name: Restart php{{ php_version }}-fpm
service:
name: php{{ php_version }}-fpm
state: restarted