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
Post a Comment