database - Ansible mysql grant -


i want grant privilege on db(test_db) user(test_user) using ansible. command shown below.

grant privileges on <test_db>.* <test_user>@'localhost'; 

how execute command using ansible.

you this:

- name: set mysql user privileges   mysql_user:     name=user_name     priv="dbname.*:all"     state=present 

of course can interpolate variables, username, db name, etc...


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -