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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -