forked from alaxli/ansible_ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
35 lines (34 loc) · 1.06 KB
/
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
34
35
---
- hosts: all
remote_user: vagrant
tasks:
- name: execute shell by ansible
shell: echo "hello world"
- name: install requirement softwares
sudo: yes
apt: name={{ item }} state=latest update_cache=yes
with_items:
- build-essential
- curl
- libmysqld-dev
- libmysqlclient-dev
- mysql-server-5.5
- python-dev
- python-ldap
- libldap2-dev
- name: install latest pip in ubuntu
shell: curl https://bootstrap.pypa.io/get-pip.py | python
sudo: yes
- name: install python requirements
sudo: yes
shell: cd /vagrant && pip install -r requirements.txt
- name: install PIL
sudo: yes
shell: pip install PIL --allow-external PIL --allow-unverified PIL
- name: Update MySQL Root Password
mysql_user: host=% name=ansibleuser password=**** priv=*.*:ALL state=present
- name: Create local development database
mysql_db: name=ansible encoding=utf8 state=present
handlers:
- name: restart mysql
service: name=mysql state=restarted