ansible-role-mysql icon indicating copy to clipboard operation
ansible-role-mysql copied to clipboard

FAILED! => {"changed": false, "msg": "Could not find the requested service mysql: host"}

Open garyyang6 opened this issue 1 year ago • 6 comments

Per https://galaxy.ansible.com/geerlingguy/mysql, I installed the role,

ansible-galaxy install geerlingguy.mysql

playbooks/install_database.yaml:

- hosts: database
  user: ubuntu
  become: yes
  vars_files:
   - ../vars/database.yaml
  roles:
    - role: geerlingguy.mysql

vars/database.yaml

mysql_databases:
  - name: db01
    encoding: utf8mb4
    collation: utf8mb4_unicode_ci
mysql_users:
  - name: linuxhint
    host: "%"
    password: secret
    priv: "db01.*:ALL"

Ran the check command,

ansible-playbook -i hosts playbooks/install_database.yaml -e ansible_python_interpreter=/usr/bin/python3 --check

I got the error,

fatal: [30.10.1.7]: FAILED! => {"changed": false, "msg": "Could not find the requested service mysql: host"}
30.10.1.7                  : ok=18   changed=2    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0

garyyang6 avatar Mar 26 '23 06:03 garyyang6

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] avatar Jul 29 '23 20:07 github-actions[bot]

I have the same problem when using with it with a Ubuntu 22.04...

okaufmann avatar Aug 20 '23 20:08 okaufmann

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] avatar Dec 30 '23 20:12 github-actions[bot]

I've got the same exact issue on RockyLinux9 in a docker container being provisioned via Vagrant.

armenr avatar Feb 11 '24 19:02 armenr

using ansible-playbook if one of MySQL's SQL scripts fails it does not execute subsequent SQL scripts and immediately ansible stop anyone having code please share me

vishwanath69 avatar Feb 22 '24 16:02 vishwanath69