From 5a012f20802498adf6ba13f48f56e5eb48d79dfd Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Tue, 28 Feb 2017 16:30:56 +0100 Subject: [PATCH] update yavdr-common role, add support for local facts --- roles/yavdr-common/defaults/main.yml | 8 ++++---- roles/yavdr-common/tasks/local_facts.yml | 15 +++++++++++++++ roles/yavdr-common/tasks/main.yml | 21 +++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 roles/yavdr-common/tasks/local_facts.yml diff --git a/roles/yavdr-common/defaults/main.yml b/roles/yavdr-common/defaults/main.yml index 1f53b94..ff1eac7 100644 --- a/roles/yavdr-common/defaults/main.yml +++ b/roles/yavdr-common/defaults/main.yml @@ -13,10 +13,10 @@ drivers: sundtek: auto ddvb-dkms: auto - extra_packages: - - vim - - tree - - w-scan +extra_packages: + - vim + - tree + - w-scan vdr: user: vdr diff --git a/roles/yavdr-common/tasks/local_facts.yml b/roles/yavdr-common/tasks/local_facts.yml new file mode 100644 index 0000000..5def209 --- /dev/null +++ b/roles/yavdr-common/tasks/local_facts.yml @@ -0,0 +1,15 @@ +--- +# file: local_facts.yml +- name: create directory for local facts + file: + dest: /etc/ansible/facts.d + state: directory + +- name: copy facts script for USB- and PCI(e)-IDs + copy: + src: files/hardware.facts.py + dest: /etc/ansible/facts.d/hardware.facts + mode: '0775' + +- name: get local facts + setup: diff --git a/roles/yavdr-common/tasks/main.yml b/roles/yavdr-common/tasks/main.yml index a7a00a3..06d34fd 100644 --- a/roles/yavdr-common/tasks/main.yml +++ b/roles/yavdr-common/tasks/main.yml @@ -38,3 +38,24 @@ - wpasupplicant - usbutils - xfsprogs + +- name: install and execute local fact scripts + - include: + - tasks/local_facts.yml + +--- +# file: local_facts.yml + +- name: create directory for local facts + file: + dest: /etc/ansible/facts.d + state: directory + +- name: copy facts script for USB- and PCI(e)-IDs + copy: + src: files/hardware.facts.py + dest: /etc/ansible/facts.d/hardware.facts + mode: '0775' + +- name: reload ansible local facts + setup: filter=ansible_local