mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
* Add one-liner lookup example
* Remove trailing whitespace
* Update plugins/lookup/tss.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/tss.py
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
(cherry picked from commit 26757edfb2)
Co-authored-by: Sylvia van Os <sylvia@hackerchick.me>
This commit is contained in:
@@ -103,6 +103,14 @@ EXAMPLES = r"""
|
|||||||
| items2dict(key_name='slug',
|
| items2dict(key_name='slug',
|
||||||
value_name='itemValue'))['password']
|
value_name='itemValue'))['password']
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
vars:
|
||||||
|
secret_password: >-
|
||||||
|
{{ ((lookup('community.general.tss', 1) | from_json).get('items') | items2dict(key_name='slug', value_name='itemValue'))['password'] }}"
|
||||||
|
tasks:
|
||||||
|
- ansible.builtin.debug:
|
||||||
|
msg: the password is {{ secret_password }}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ansible.errors import AnsibleError, AnsibleOptionsError
|
from ansible.errors import AnsibleError, AnsibleOptionsError
|
||||||
|
|||||||
Reference in New Issue
Block a user