mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adding another example for tss lookup (#1945)
* 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>
This commit is contained in:
parent
4f98136771
commit
677ab8e383
1 changed files with 21 additions and 0 deletions
|
@ -82,6 +82,27 @@ EXAMPLES = r"""
|
|||
| items2dict(key_name='slug',
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue