Hi Ian,

There was a similar issue back in 2015/16, see
https://github.com/ansible/ansible/issues/29611 and also
https://stackoverflow.com/questions/28908155/ansible-mysql-user-priv-invalid-privileges-string-invalid-privileges-specifi
amongst quite a few others. They all referenced spaces being in the
privilege string.

Are you able to try that without the spaces between privileges?

Cheers
David

On Thu, 18 Jan 2024 at 14:18, Ian Hobson <[email protected]> wrote:

> Hi All,
>
> I am attempting to use Ansible to create a MySQL backup user. It should
> be able to read and lock tables for everything. The step in the playbook
> is this.
>
> - name: create user - GRANT SELECT, PROCESS, LOCK TABLES ON *.* TO
> `backup`@`localhost`
>    community.mysql.mysql_user:
>      user: backup
>      host: localhost
>      login_password: <redacted>
>      priv: '*.*:SELECT, PROCESS, LOCK TABLES'
>
> The error message is:
> fatal: [ubuntu2004.hcs]: FAILED! => {"changed": false, "msg": "invalid
> privileges string: Invalid privileges specified: frozenset({' PROCESS,
> LOCK TABLES'})"}
>
> I can see nothing wrong with the priv line. Can someone spot it?
>
> Regards
>
> Ian
>
> --
> Ian Hobson
> Tel (+66) 626 544 695
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/16f33419-6d92-4097-a0ea-aa52532e29e8%40gmail.com
> .
>


-- 
if in trouble, or in doubt
run in circles, scream and shout

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2B8iFp4ZPvrh9nX5YiD%3DPw15REvXcahBdogGqiSRZe64FOvxHw%40mail.gmail.com.

Reply via email to