From 33b73344ef4119c849696e8b845c5cde420ac19d Mon Sep 17 00:00:00 2001 From: Olli Graf Date: Wed, 23 Jul 2025 20:31:51 +0200 Subject: [PATCH] with_fileglob --- roles/with_fileglob/tasks/main.yml | 7 +++++++ with_fileglob.yml | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 roles/with_fileglob/tasks/main.yml create mode 100644 with_fileglob.yml diff --git a/roles/with_fileglob/tasks/main.yml b/roles/with_fileglob/tasks/main.yml new file mode 100644 index 0000000..152f254 --- /dev/null +++ b/roles/with_fileglob/tasks/main.yml @@ -0,0 +1,7 @@ +- name: "Beispiel 1: Alle .conf Dateien in /etc auflisten" + debug: + msg: "Gefundene Konfigurationsdatei: {{ item }}" + with_fileglob: + - /etc/*.conf + + diff --git a/with_fileglob.yml b/with_fileglob.yml new file mode 100644 index 0000000..1234e13 --- /dev/null +++ b/with_fileglob.yml @@ -0,0 +1,8 @@ +- hosts: "{{ target }}" + vars_files: + - loop_files.yml + gather_facts: false + remote_user: pi + roles: + - with_fileglob +