Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request update to priv section of mysql_user task to denote the absence of spacing. #683

Open
rujschafer opened this issue Oct 17, 2024 · 0 comments

Comments

@rujschafer
Copy link

rujschafer commented Oct 17, 2024

SUMMARY

We just resolved a problem with a role where the priv: section of the mysql_user task was idempotent if running in normal mode but not idempotent if running in check mode. It was all based on a space in the priv section.

This code yielded idempotent in normal mode and not idempotent in check mode.

community.mysql.mysql_user:
    name: "{{ mysql_backup_user.user }}"
    password: "{{ mysql_backup_user.pass }}"
    priv: '*.*: ALL'
    host: "{{ item }}"
    state: present
    login_user: root
    login_password: "{{ mysql_root_password }}"
  with_items: "{{ mysql_backup_hosts }}"

this code yielded idempotent for both normal and check mode.

community.mysql.mysql_user:
    name: "{{ mysql_backup_user.user }}"
    password: "{{ mysql_backup_user.pass }}"
    priv: '*.*:ALL'
    host: "{{ item }}"
    state: present
    login_user: root
    login_password: "{{ mysql_root_password }}"
  with_items: "{{ mysql_backup_hosts }}"
ISSUE TYPE
  • Documentation Report

For other readers help, please add wording in the priv section to denote removal of any extra spacing in the string.

COMPONENT NAME

community.mysql.mysql_user

ANSIBLE VERSION
ansible [core 2.15.8]
  config file = $HOME/ansible.cfg
  configured module search path = ['$HOME/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
  ansible collection location = $HOME/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.2 (main, Sep 12 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant