mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-28 18:34:44 +00:00
Merge pull request #1149 from rjeffman/fix_rhel_4934
ipauser: Do not try to modify user when not changing password
This commit is contained in:
@@ -1449,6 +1449,10 @@ def main():
|
|||||||
del args["userpassword"]
|
del args["userpassword"]
|
||||||
if "random" in args:
|
if "random" in args:
|
||||||
del args["random"]
|
del args["random"]
|
||||||
|
# if using "random:false" password should not be
|
||||||
|
# generated.
|
||||||
|
if not args.get("random", True):
|
||||||
|
del args["random"]
|
||||||
if "noprivate" in args:
|
if "noprivate" in args:
|
||||||
del args["noprivate"]
|
del args["noprivate"]
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,17 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed or result.failed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
|
- name: Ensure user presence with 'random:false'
|
||||||
|
ipauser:
|
||||||
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||||
|
name: pinky
|
||||||
|
first: pinky
|
||||||
|
last: Acme
|
||||||
|
random: false
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Set street, again
|
- name: Set street, again
|
||||||
ipauser:
|
ipauser:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
Reference in New Issue
Block a user