mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
influxdb_user: Don't grant admin privilege in check mode (#26)
influxdb_user module don't change the admin flag for existing user Fixes: ansible/ansible#68139 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
027ffcae56
commit
cc2b1e7b6d
1 changed files with 4 additions and 2 deletions
|
@ -235,9 +235,11 @@ def main():
|
|||
|
||||
try:
|
||||
if admin and not user['admin']:
|
||||
if not module.check_mode:
|
||||
client.grant_admin_privileges(user_name)
|
||||
changed = True
|
||||
elif not admin and user['admin']:
|
||||
if not module.check_mode:
|
||||
client.revoke_admin_privileges(user_name)
|
||||
changed = True
|
||||
except influx.exceptions.InfluxDBClientError as e:
|
||||
|
|
Loading…
Reference in a new issue