community.mysql
community.mysql copied to clipboard
mysql_user: Allow to check for implicit_admin w/o any action
Copied from https://github.com/ansible-collections/community.general/issues/755 Initially reported by @Akasurde
From @MarcinOrlowski on May 04, 2017 15:06
ISSUE TYPE
- Feature Idea
COMPONENT NAME
mysql_user
ANSIBLE VERSION
ansible 2.3.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/usr/share/ansible']
python version = 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]
OS / ENVIRONMENT
N/A
SUMMARY
Would be useful to use mysql_user with just check_implicit_admin (no name given) which combined with register would just check for implicit admin access allowing further steps in role to rely on the result (i.e. skip certain actions).
STEPS TO REPRODUCE
- mysql_user:
check_implicit_admin: yes
register: check_result
- debug:
var: check_result
EXPECTED RESULTS
ok: [pl_neo_sql] => {
"changed": false,
"implicit_admin": true
}
ACTUAL RESULTS
It actually fails as name is required.
Copied from original issue: ansible/ansible#24298
From @Andersson007 on Jun 09, 2020 09:33
can't we do it as it is now using
ingore_errors: yes
check_implicit_admin: yes
? needs_info