33 lines
884 B
YAML
33 lines
884 B
YAML
|
---
|
||
|
# Template-Dateien:
|
||
|
# template-loop/templates/etc/abc.conf
|
||
|
# template-loop/templates/usr/local/share/abc.conf
|
||
|
# template-loop/templates/var/lib/abc.conf
|
||
|
|
||
|
- name: Template-Loop mit relativen Pfaden
|
||
|
debug:
|
||
|
msg: "Template-Argumente: src={{ item }} dest=/{{ item }} ..."
|
||
|
loop:
|
||
|
- etc/abc.conf
|
||
|
- usr/local/share/abc.conf
|
||
|
- var/lib/abc.conf
|
||
|
|
||
|
- name: Template-Loop mit absoluten Pfaden
|
||
|
debug:
|
||
|
msg: "Template-Argumente: src={{ item|replace('/', '', count=1) }} dest={{ item }} ..."
|
||
|
loop:
|
||
|
- /etc/abc.conf
|
||
|
- /usr/local/share/abc.conf
|
||
|
- /var/lib/abc.conf
|
||
|
|
||
|
- name: Template-Loop mit Mapping
|
||
|
debug:
|
||
|
msg: "Template-Argumente: src={{ item.key }} dest={{ item.value }} ..."
|
||
|
loop: "{{ configfiles|dict2items }}"
|
||
|
vars:
|
||
|
configfiles:
|
||
|
etc.conf: /etc/abc.conf
|
||
|
share.conf: /usr/local/share/abc.conf
|
||
|
lib.conf: /var/lib/abc.conf
|
||
|
|