mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
521 B
YAML
21 lines
521 B
YAML
13 years ago
|
##
|
||
|
# Example Ansible playbook that uses the MySQL module.
|
||
|
#
|
||
|
|
||
|
---
|
||
|
- hosts: all
|
||
|
user: root
|
||
|
|
||
|
vars:
|
||
|
mysql_root_password: 'password'
|
||
|
|
||
|
tasks:
|
||
|
|
||
|
- name: Create database user
|
||
|
action: mysql_user loginpass=$mysql_root_password user=bob passwd=12345 priv=*.*:ALL state=present
|
||
|
|
||
|
- name: Create database
|
||
|
action: mysql_db loginpass=$mysql_root_password db=bobdata state=present
|
||
|
|
||
|
- name: Ensure no user named 'sally' exists
|
||
|
action: mysql_user loginpass=$mysql_root_password user=sally state=absent
|