Schulungszeug entfernt, hosts auf neues Netzwerk angepasst
This commit is contained in:
@@ -3,10 +3,10 @@ all:
|
||||
children:
|
||||
mediaserver:
|
||||
hosts:
|
||||
192.168.8.210: #proxmox
|
||||
192.168.8.201: #truenas
|
||||
192.168.8.200: #mediaserver
|
||||
192.168.8.205: #podman testhost
|
||||
192.168.2.210: #proxmox
|
||||
192.168.2.201: #truenas
|
||||
192.168.2.200: #mediaserver
|
||||
192.168.2.205: #podman testhost
|
||||
vps:
|
||||
hosts:
|
||||
eichner.cc:
|
||||
|
||||
54
test.yml
54
test.yml
@@ -1,54 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
|
||||
vars:
|
||||
demo_list:
|
||||
- ip: 1.2.3.4
|
||||
id: 1
|
||||
name: demo1
|
||||
- ip: 2.2.3.4
|
||||
id: 2
|
||||
name: demo2
|
||||
- ip: 3.2.3.4
|
||||
id: 3
|
||||
name: demo3
|
||||
|
||||
user_list:
|
||||
- name: erika
|
||||
comment: "bla"
|
||||
id: 1001
|
||||
- name: max
|
||||
id: 1002
|
||||
comment: "jo"
|
||||
shell: /bin/false
|
||||
|
||||
tasks:
|
||||
- name: the list
|
||||
debug:
|
||||
msg: "{{ user_list }}"
|
||||
- name: names
|
||||
debug:
|
||||
msg: "{{ item.name }} + {{ item.id }} + {{ item.shell | default('/bin/bash') }}"
|
||||
loop:
|
||||
"{{ user_list }}"
|
||||
|
||||
|
||||
|
||||
# - name: the list
|
||||
# debug:
|
||||
# msg: "{{ demo_list }}"
|
||||
|
||||
#- name: unflattened list
|
||||
# debug:
|
||||
# msg: "{{ item.id }} {{ item.ip }} {{ item.name }}"
|
||||
#msg: "{{ item.name }}"
|
||||
# loop:
|
||||
#"{{ demo_list }}"
|
||||
|
||||
#- name: flattened list == unflattened list in this case
|
||||
# debug:
|
||||
# msg: "{{ item.id }} {{ item.ip }} {{ item.name }}"
|
||||
# loop:
|
||||
# "{{ demo_list | flatten(levels=1) }}"
|
||||
...
|
||||
Reference in New Issue
Block a user