-
Notifications
You must be signed in to change notification settings - Fork 22
/
playbook.yml
33 lines (33 loc) · 885 Bytes
/
playbook.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
- hosts: all
become: true
tasks:
- apt_repository:
repo: 'ppa:ondrej/php'
- apt:
update_cache: yes
- apt: name={{item}} state=present
with_items:
- apache2
- php5.6
- php5.6-mysql
- php5.6-cli
- php5.6-mcrypt
- php5.6-mbstring
- php5.6-mysql
- php5.6-gd
- php5.6-intl
- php5.6-curl
- php5.6-zip
- mysql-server
- python-mysqldb
- lineinfile:
path: '/etc/apache2/sites-available/000-default.conf'
regexp: 'DocumentRoot'
line: ' DocumentRoot /var/www/epesi'
- service: name=apache2 state=restarted
- mysql_db: name=epesi state=present
- mysql_user:
name: admin
password: "{{ lookup('password', './mysqlpassword length=8') }}"
priv: 'epesi.*:ALL,GRANT'
state: present