bennojoy / mysql

ansible role for mysql
150 stars 137 forks source link

One example for multiple grants ? #12

Open rgarrigue opened 10 years ago

rgarrigue commented 10 years ago

Here the command line I'm willing to do with ansible

mysql -u root -p -e "grant all on centreon.* to 'centreon'@localhost identified by 'centreon'; grant all on centreon_storage.* to 'centreon'@localhost identified by 'centreon'; grant all on centreon_status.* to 'centreon'@localhost identified by 'centreon';"

I've a meta/main.yml like this


---
dependencies:
  - { role: httpd }
  - { role: mysql,  mysql_root_db_pass: centreon, mysql_users: [{name: centreon,  pass: centreon, priv: "centreon.*:ALL"}] }
# Need centreon_storage et centreon_status

How would you do that? That could make one more example (or a tweak in a existing one) in the README.md