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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -