geerlingguy / ansible-role-mysql

Ansible Role - MySQL
https://galaxy.ansible.com/geerlingguy/mysql/
MIT License
1.05k stars 861 forks source link

error "couldn't resolve module/action 'mysql_user'" when i used in awx #529

Closed yunhai20082008 closed 7 months ago

yunhai20082008 commented 1 year ago

the project in in : https://github.com/yunhai20082008/buluma_ansible_mysql the error is:

***********************
TASK [geerlingguy.mysql : Ensure MySQL is started and enabled on boot.] ********
ok: [web01]
TASK [geerlingguy.mysql : ansible.builtin.include_tasks] ***********************
ERROR! couldn't resolve module/action 'mysql_user'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/runner/requirements_roles/geerlingguy.mysql/tasks/secure-installation.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: Ensure default user is present.
  ^ here

Do i need to add any collections in yml?

yunhai20082008 commented 1 year ago

it seems that i use the laste awx with ansible 8 in it.and this is based on ansible 2.9 the newer use "community.mysql.mysql_user: " instead of "mysql_user:" but I'm not sure,anyone could give me some advises?

github-actions[bot] commented 9 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] commented 7 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

stefanmalmesjo commented 4 months ago

Late answer, but in case someone else stumbles on it, in my case I had missed to run:

ansible-galaxy collection install community.mysql