with_lines Beispiel
This commit is contained in:
8
roles/with_lines/tasks/main.yml
Normal file
8
roles/with_lines/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- name: "Beispiel 1: Alle .conf Dateien in /etc auflisten"
|
||||
debug:
|
||||
msg: "Gefundene Konfigurationsdatei: {{ item }}"
|
||||
with_lines:
|
||||
- "find /etc -name '*.conf' -type f 2>/dev/null | head -5"
|
||||
- ls ~
|
||||
tags: [basic_example]
|
||||
|
8
with_lines.yml
Normal file
8
with_lines.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- hosts: "{{ target }}"
|
||||
vars_files:
|
||||
- loop_files.yml
|
||||
gather_facts: false
|
||||
remote_user: pi
|
||||
roles:
|
||||
- with_lines
|
||||
|
Reference in New Issue
Block a user