File tree Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
breaking_changes :
2
2
- Folder lookup module - Return the complete folder information, not only the extensions.
3
- Refer to the module documentation for more details.
3
+ To adjust your playbooks, you have to use "{{ my_lookup_result.extensions }}" instead of
4
+ " {{ my_lookup_result }}" .
Original file line number Diff line number Diff line change 88
88
"""
89
89
90
90
EXAMPLES = """
91
- - name: Get the attributes of folder /tests
91
+ - name: Get the attributes of folders /tests and /snmp
92
92
ansible.builtin.debug:
93
- msg: "Attributes of folder /network: {{ attributes }}"
94
- vars:
95
- attributes: "{{
96
- lookup('checkmk.general.folder',
97
- '~tests',
98
- server_url=my_server_url,
99
- site=mysite,
100
- automation_user=myuser,
101
- automation_secret=mysecret,
102
- validate_certs=False
103
- )
104
- }}"
93
+ msg: "Extended attributes of folder /network: {{ attributes.extensions }}"
94
+ loop: "{{
95
+ lookup('checkmk.general.folder',
96
+ '~tests', '~snmp',
97
+ server_url=my_server_url,
98
+ site=mysite,
99
+ automation_user=myuser,
100
+ automation_secret=mysecret,
101
+ validate_certs=False
102
+ )
103
+ }}"
105
104
106
105
- name: "Use variables outside the module call."
107
106
ansible.builtin.debug:
108
- msg: "Attributes of folder /network: {{ attributes }}"
107
+ msg: "Extended attributes of folder /network: {{ attributes.extensions }}"
109
108
vars:
110
109
ansible_lookup_checkmk_server_url: "http://myserver/"
111
110
ansible_lookup_checkmk_site: "mysite"
118
117
RETURN = """
119
118
_list:
120
119
description:
121
- - A list of dicts of attributes of the folder(s)
120
+ - A dict of attributes of the folder if you query a single folder
121
+ - A list of dicts of attributes of the folders if you query multiple folders
122
122
type: list
123
123
elements: str
124
124
"""
You can’t perform that action at this time.
0 commit comments