From 047cb40b1a43d66a473e03c47393c1bdb24f1bed Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 2 Jul 2020 19:02:45 +0200 Subject: [PATCH] local facts update --- tasks/local_facts.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tasks/local_facts.yaml b/tasks/local_facts.yaml index 5dab6de..b3f7f64 100644 --- a/tasks/local_facts.yaml +++ b/tasks/local_facts.yaml @@ -1,15 +1,17 @@ --- -- name: local facts directory +- name: ansible local facts directory file: path: /etc/ansible/facts.d state: directory -- name: local facts +- name: set ansible local fact copy: - content: "{{ _netdata_local_facts | to_json }}" - dest: /etc/ansible/facts.d/netdata.fact + content: "{{_local_facts|to_json}}" + dest: /etc/ansible/facts.d/{{role_name}}.fact + mode: 0600 + register: _local_facts_set -- name: reread local facts +- name: Gathering Facts setup: - filter: ansible_local + when: _local_facts_set.changed