File tree Expand file tree Collapse file tree 13 files changed +113
-20
lines changed
Expand file tree Collapse file tree 13 files changed +113
-20
lines changed Original file line number Diff line number Diff line change 11.tags
2-
2+ .vagrant
3+ * .log
Original file line number Diff line number Diff line change 1- php7-fpm Ansible playbook
2- =========================
1+ php7-fpm Ansible role
2+ =====================
33
4- This playbook will install php7-fpm in Xenial (16.04)
4+ This role will install php7-fpm in Xenial (16.04)
55
66Requirements
77------------
Original file line number Diff line number Diff line change 1+ Vagrant . configure ( 2 ) do |config |
2+ config . vm . box = "ubuntu/xenial64"
3+
4+ config . vm . provider "virtualbox" do |v |
5+ v . linked_clone = true
6+ end
7+
8+ config . vm . define "php7" do |php7 |
9+ end
10+
11+ config . vm . provision "shell" ,
12+ :path => "vagrant_specs.sh" ,
13+ :upload_path => "/home/ubuntu/specs" ,
14+ # change role name below
15+ :args => "--install ansible-php7-fpm"
16+ end
Original file line number Diff line number Diff line change 11- name : Restart php7-fpm
2- service : name=php7.0-fpm state=restarted
3- notify :
4- - Restart nginx
2+ service :
3+ name : php{{ php7_version }}-fpm
4+ state : restarted
5+
Original file line number Diff line number Diff line change @@ -16,6 +16,5 @@ galaxy_info:
1616 categories :
1717 - development
1818
19- dependencies :
20- - role : ansible-nginx
19+ dependencies : []
2120
Original file line number Diff line number Diff line change 1- - include : php7-fpm.yml tags=php7-fpm
1+ - include : php7-fpm.yml
2+ tags : ["php7-fpm"]
Original file line number Diff line number Diff line change 1+ - name : Adds ondrej repos
2+ apt_repository :
3+ repo : " ppa:ondrej/php"
4+ update_cache : yes
5+
6+ - name : Show selected php7_version
7+ debug : msg="Deploying php7 version {{ php7_version }}"
8+
19- name : Installs php7-fpm
2- apt :
10+ apt :
311 pkg : " {{ item }}"
412 state : latest
513 update_cache : yes
614 notify :
715 - Restart php7-fpm
816 with_items :
9- - php7.0-fpm
17+ - composer
18+ - php{{ php7_version }}-fpm
1019 - php-apcu
11- - php7.0 -mcrypt
12- - php7.0 -gd
13- - php7.0 -curl
20+ - php{{ php7_version }} -mcrypt
21+ - php{{ php7_version }} -gd
22+ - php{{ php7_version }} -curl
1423 - php-pear
15- - php7.0 -mysql
24+ - php{{ php7_version }} -mysql
1625
1726- name : Adds php.ini
18- template :
27+ template :
1928 src : " ../templates/php.ini.j2"
20- dest : /etc/php/7.0 /fpm/php.ini
29+ dest : /etc/php/{{ php7_version }} /fpm/php.ini
2130 backup : yes
2231 notify :
2332 - Restart php7-fpm
24- - Restart nginx
33+
34+ - name : Checks if nginx is already installed
35+ stat :
36+ path : /etc/nginx/conf.d/
37+ register : __nginx_config_dir
2538
2639- name : Adds nginx buffer tuning
2740 template :
2841 src : " ../templates/fastcgi_buffers.conf.j2"
2942 dest : /etc/nginx/conf.d/fastcgi_buffers.conf
43+ when : __nginx_config_dir is defined and __nginx_config_dir.isdir is defined and __nginx_config_dir.isdir
3044 notify :
3145 - Restart php7-fpm
3246 - Restart nginx
4054 shell : pear install {{ item }}
4155 with_items : pear.packages
4256 when : pear is defined
43-
Original file line number Diff line number Diff line change 1+ placeholder_fqdn
Original file line number Diff line number Diff line change 1+ ubuntu-xenial.localdomain
Original file line number Diff line number Diff line change 1+ ---
2+
3+ - hosts : all
4+ sudo : true
5+
6+ roles :
7+ - role : ansible-php7-fpm
You can’t perform that action at this time.
0 commit comments