-
Notifications
You must be signed in to change notification settings - Fork 0
/
php5-fpm.yml
59 lines (50 loc) · 1.53 KB
/
php5-fpm.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
- hosts: all
sudo: yes
remote_user: root
vars:
main_nodes_ips: "{% set IP_ARR=[] %}{% for host in groups['all'] %}{% if IP_ARR.insert(loop.index,hostvars[host]['ansible_default_ipv4']['address']) %}{% endif %}{% endfor %}{{IP_ARR|join(' ')}}"
main_nodes_ipc: "{% set IP_ARR=[] %}{% for host in groups['all'] %}{% if IP_ARR.insert(loop.index,hostvars[host]['ansible_default_ipv4']['address']) %}{% endif %}{% endfor %}{{IP_ARR|join(',')}}"
ipv4_master_addr: "{{ hostvars[groups['all'][0]]['ansible_default_ipv4']['address'] }}"
vars_files:
- "{{ var_file }}"
tasks:
- name: update apt
apt: update_cache=yes
- name: ensure packages installed
apt: pkg={{ item }} state=latest
with_items:
- php-apcu
- php-igbinary
- php-imagick
- php-memcached
- php-mongodb
- php-msgpack
- php-ssh2
#- php5-apcu
- php5-cli
- php5-common
- php5-curl
- php5-fpm
- php5-gd
- php5-igbinary
#- php5-imagick
- php5-intl
- php5-json
- php5-ldap
- php5-memcache
- php5-memcached
- php5-mongo
- php5-msgpack
- php5-mysqlnd
- php5-readline
- php5-ssh2
- php5-xsl
- name: Create infra dirs
command: mkdir -p /infra/etc/{{cluster_name}}/php5
- name : Remove node conf in /etc
shell: [ ! -h /etc/php5 ] && mv /etc/php5 /infra/etc/{{cluster_name}}/
- name : move node conf to infra
shell: [ ! -h /etc/php5 ] && ln -s /infra/etc/{{ cluster_name }}/php5 /etc/php5
- name: restart services
command: service php5-fpm restart