* Adding another example for tss lookup
A more detailed example using self-hosted secrets server as investigated in #1943
* Update plugins/lookup/tss.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Better line breaking
* Update plugins/lookup/tss.py
Seconded!
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove newline to pass tests
* Update plugins/lookup/tss.py
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 677ab8e383
)
Co-authored-by: Jim Speir <jimbo80982@gmail.com>
pull/1958/head
parent
b1231d20a8
commit
72a1f5bbd2
|
@ -82,6 +82,27 @@ EXAMPLES = r"""
|
||||||
| items2dict(key_name='slug',
|
| items2dict(key_name='slug',
|
||||||
value_name='itemValue'))['password']
|
value_name='itemValue'))['password']
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
vars:
|
||||||
|
secret: >-
|
||||||
|
{{
|
||||||
|
lookup(
|
||||||
|
'community.general.tss',
|
||||||
|
102,
|
||||||
|
base_url='https://secretserver.domain.com/SecretServer/',
|
||||||
|
username='user.name',
|
||||||
|
password='password'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
tasks:
|
||||||
|
- ansible.builtin.debug:
|
||||||
|
msg: >
|
||||||
|
the password is {{
|
||||||
|
(secret['items']
|
||||||
|
| items2dict(key_name='slug',
|
||||||
|
value_name='itemValue'))['password']
|
||||||
|
}}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||||
|
|
Loading…
Reference in New Issue