2012-07-12 01:00:55 +02:00
|
|
|
##
|
|
|
|
# Example Ansible playbook that uses the MySQL module.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
user: root
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Create database user
|
2012-08-29 00:51:12 +02:00
|
|
|
action: mysql_user user=bob password=12345 priv=*.*:ALL state=present
|
2012-07-12 01:00:55 +02:00
|
|
|
|
|
|
|
- name: Create database
|
2012-08-29 00:51:12 +02:00
|
|
|
action: mysql_db db=bobdata state=present
|
2012-07-12 01:00:55 +02:00
|
|
|
|
2012-08-29 00:51:12 +02:00
|
|
|
- name: Ensure no user named 'sally' exists and delete if found.
|
|
|
|
action: mysql_user user=sally state=absent
|