-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathsetup.yml
44 lines (29 loc) · 1.05 KB
/
setup.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
- hosts: all
become: true
vars:
hostname: mywordpress
tasks:
- name: ==> 0 - add host info
lineinfile: dest=/etc/hosts line="10.0.0.10 {{ hostname }}" state=present
- name: ==> 1 - add PPA of php7 (community)
apt_repository: repo="ppa:ondrej/php"
- debug: msg="==> 2 - add PPA of nginx (official)"
- name: add Nginx stable repository (deb)
apt_repository: >
repo='deb http://nginx.org/packages/ubuntu/ trusty nginx'
state=present
- name: add Nginx stable repository (deb-src)
apt_repository:
repo: 'deb-src http://nginx.org/packages/ubuntu/ trusty nginx'
state: present
- name: add Nginx.org key
apt_key: url=http://nginx.org/keys/nginx_signing.key state=present
- name: ==> 3 - download/update the package lists
apt: update_cache=yes
- name: ==> 4 - install nginx
apt: name=nginx state=present
- name: install php-fpm and php-mysql
apt: name={{ item }} state=present
with_items:
- php7.0-fpm
- php7.0-mysql