mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 10:54:44 +00:00
ipahost: Return generated random password
The random password is only returned if random is yes and the host did
not exist or update_password is yes.
If only one host is handled by the module, the returned dict is containing
this dict:
{ "randompassword": "<the host random password>" }
If several hosts are handled by the module (future feature):
{ "<host>": { "randompassword": "<the host random password>" } }
Fixes issue #134 (ipahost does not return the random password)
This commit is contained in:
@@ -101,6 +101,11 @@ Example playbook to initiate the generation of a random password to be used in b
|
||||
description: Example host
|
||||
ip_address: 192.168.0.123
|
||||
random: yes
|
||||
register: ipahost
|
||||
|
||||
- name: Print generated random password
|
||||
debug:
|
||||
var: ipahost.host.randompassword
|
||||
```
|
||||
|
||||
|
||||
@@ -167,6 +172,21 @@ Variable | Description | Required
|
||||
`state` | The state to ensure. It can be one of `present`, `absent` or `disabled`, default: `present`. | yes
|
||||
|
||||
|
||||
Return Values
|
||||
=============
|
||||
|
||||
ipahost
|
||||
-------
|
||||
|
||||
There are only return values if one or more random passwords have been generated.
|
||||
|
||||
Variable | Description | Returned When
|
||||
-------- | ----------- | -------------
|
||||
`host` | Host dict with random password. (dict) <br>Options: | If random is yes and host did not exist or update_password is yes
|
||||
| `randompassword` - The generated random password | If only one host is handled by the module
|
||||
| `name` - The host name of the host that got a new random password. (dict) <br> Options: <br> `randompassword` - The generated random password | If several hosts are handled by the module
|
||||
|
||||
|
||||
Authors
|
||||
=======
|
||||
|
||||
|
||||
Reference in New Issue
Block a user