-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.yml
36 lines (31 loc) · 898 Bytes
/
site.yml
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
31
32
33
34
35
36
---
- name: Demo playbook
hosts: localhost
collections:
- ginigangadharan.network_utilities
# version: 0.0.6
# source: https://automationhub22-1.lab.local/api/galaxy/content/published/
vars:
my_list:
- "apple"
- "mango"
- "orange"
# collections:
# - ginigangadharan.network_utilities
# source: https://automationhub22-1.lab.local
tasks:
# - name: Get uptime and details
# ansible.builtin.shell: "hostname"
# register: output_shell
# - name: Show details
# ansible.builtin.debug:
# msg: "{{ output_shell }}"
- name: Print the List
ansible.builtin.debug:
msg: "{{ my_list }}"
- name: Concatenate a list to string
ansible.builtin.set_fact:
my_string: "{{ my_list | join(',') }}"
- name: Print the String
ansible.builtin.debug:
msg: "{{ my_string }}"