-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path20-function.yaml
More file actions
31 lines (27 loc) · 818 Bytes
/
20-function.yaml
File metadata and controls
31 lines (27 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- name: learn aboyt the filters==functions
hosts: local
connection: local
vars:
person: "ramesh,suresh,joseph,raheem"
tasks:
- name: check undefined variable
ansible.builtin.debug:
msg: "{{ person | default('ramesh') }}"
- name: print the names
ansible.builtin.debug:
msg: {{ person | split(,) }}
- name: dictionary to items
vars:
skill:
script: python
CI: jenkins
ansible.builtin.debug:
msg: {{ person | dict2items }}
- name : items to dictionary
vars:
skill:
- {'key': 'configure-management', 'value': 'ansible'}
- {'key': 'ci', 'value': 'jenkins'}
- {'key': 'script', 'value': 'shell'}
ansible.builtin.debug:
msg: {{ person | dict2items }}