42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
- hosts: all
|
|
sudo: True
|
|
|
|
tasks:
|
|
- apt: update-cache=yes upgrade=yes
|
|
- apt: name={{ item }} state=latest
|
|
with_items:
|
|
- expect
|
|
- git
|
|
- ibmysqlclient-dev
|
|
- mysql-client
|
|
- mysql-server
|
|
- python-daemon
|
|
- python-dev
|
|
- python-kombu
|
|
- python-mysqldb
|
|
- python-pillow
|
|
- python-sqlalchemy
|
|
- python-virtualenv
|
|
- rabbitmq-server
|
|
- service: name=rabbitmq-server state=started enabled=yes
|
|
- rabbitmq_user: user=guest
|
|
password=secretsecret
|
|
- rabbitmq_user: user=tutorial
|
|
password=secretsecret
|
|
vhost=/
|
|
configure_priv=.*
|
|
read_priv=.*
|
|
write_priv=.*
|
|
state=present
|
|
- rabbitmq_plugin: names=rabbitmq_management state=enabled
|
|
- copy: src=files/my.cnf dest=/etc/my.cnf
|
|
- service: name=mysql state=restarted enabled=yes
|
|
- copy: src=files/mysql_secure_installation.sh
|
|
dest=/root/mysql_secure_installation.sh
|
|
mode=0755
|
|
- command: /root/mysql_secure_installation.sh
|
|
creates=/root/mysql_secure_installation.done
|
|
- copy: src=files/client.my.cnf dest=/root/.my.cnf
|
|
- mysql_db: name=tutorial state=present
|
|
- mysql_user: name=tutorial password=secretsecret priv=tutorial.*:ALL state=present
|