mirror of
https://github.com/LIV2/ansible-modules-hashivault.git
synced 2025-12-06 06:32:48 +00:00
Merge pull request #417 from LIV2/main
Fixup idempotency of hashivault_auth_ldap
This commit is contained in:
commit
49659840ac
@ -139,8 +139,8 @@ def main():
|
||||
argspec['group_attr'] = dict(required=False, type='str', default='cn')
|
||||
argspec['group_dn'] = dict(required=False, type='str', default='')
|
||||
argspec['use_token_groups'] = dict(required=False, type='bool', default=False)
|
||||
argspec['token_ttl'] = dict(required=False, type='str', default='')
|
||||
argspec['token_max_ttl'] = dict(required=False, type='str', default='')
|
||||
argspec['token_ttl'] = dict(required=False, type='int', default=0)
|
||||
argspec['token_max_ttl'] = dict(required=False, type='int', default=0)
|
||||
|
||||
module = hashivault_init(argspec, supports_check_mode=True)
|
||||
result = hashivault_auth_ldap(module)
|
||||
|
||||
@ -18,11 +18,17 @@
|
||||
|
||||
- name: ldap configuration
|
||||
hashivault_auth_ldap:
|
||||
ldap_url: ldap://127.0.0.1
|
||||
ldap_url: ldap://localhost
|
||||
register: ldap_module
|
||||
- assert: { that: "{{ ldap_module.changed }} == True" }
|
||||
- assert: { that: "{{ ldap_module.rc }} == 0" }
|
||||
|
||||
- name: ldap configuration is idempotent
|
||||
hashivault_auth_ldap:
|
||||
ldap_url: ldap://localhost
|
||||
register: ldap_module_idempotent
|
||||
- assert: { that: "{{ ldap_module_idempotent.changed }} == False" }
|
||||
|
||||
- name: remove ldap group
|
||||
hashivault_ldap_group:
|
||||
name: test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user