Ansible Issue 1 - timer and profile_tasks Callback Plugins:
When running ansible-playbook against prepare.yml (main.yml was throwing errors), I routinely got errors regarding missing timer and profile_tasks callback plugins:
When running ansible-playbook against main.yml, the same error kept showing, indicating that the mysql_user module wasn't installed. Error:
(.venv) root@myhostname:/home/ubuntu/LOAD/ansible# ansible-playbook main.yml
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 '/home/ubuntu/LOAD/ansible/roles/linux/mysql/tasks/main.yml': line 23, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Ensure root user can only login from localhost
^ here
Fixed by installing the community.mysql collection using ansible-galaxy:
Ansible Issue 1 -
timer
andprofile_tasks
Callback Plugins:When running
ansible-playbook
againstprepare.yml
(main.yml
was throwing errors), I routinely got errors regarding missingtimer
andprofile_tasks
callback plugins:Fixed by installing
ansible.posix
in addition to otheransible-galaxy
requirements:(.venv) root@myhostname:/home/ubuntu/LOAD/ansible # ansible-galaxy collection install ansible.posix
Ansible Issue 2 -
mysql_user
Module:When running
ansible-playbook
againstmain.yml
, the same error kept showing, indicating that themysql_user
module wasn't installed. Error:Fixed by installing the
community.mysql
collection usingansible-galaxy
:(.venv) root@myhostname:/home/ubuntu/LOAD/ansible # ansible-galaxy collection install community.my_sql
Also had to modify the
LOAD/ansible/roles/linux/mysql/tasks/main.yml
file - specifically, line 24 to include the full fully qualified module name:community.mysql.mysql_user: