From ae7fd7fb552c8bb44860e7787910365de824c070 Mon Sep 17 00:00:00 2001 From: Gordon Kelly Date: Wed, 28 Feb 2018 22:51:48 +0000 Subject: [PATCH] ansible: add functionality to copy custom config files to target node Change-Id: I6e7cb3e0923495e236b74444b1da3f4450122d02 Signed-off-by: Gordon Kelly --- docker/ansible/roles/config_files/tasks/main.yml | 11 +++++++++++ docker/ansible/roles/config_files/vars/main.yml | 3 +++ 2 files changed, 14 insertions(+) diff --git a/docker/ansible/roles/config_files/tasks/main.yml b/docker/ansible/roles/config_files/tasks/main.yml index 2f0938c0..27362e3b 100644 --- a/docker/ansible/roles/config_files/tasks/main.yml +++ b/docker/ansible/roles/config_files/tasks/main.yml @@ -70,3 +70,14 @@ - name: enable virt plugin import_tasks: virt.yml + +- name: copy additional configuration files to target system + template: + src: "{{ item }}" + dest: "{{ config_file_dir }}/{{ item | basename | regex_replace('\\.j2','') }}" + tags: + - always + - copy_additional_configs + with_fileglob: + - "{{ additional_configs_path }}" + diff --git a/docker/ansible/roles/config_files/vars/main.yml b/docker/ansible/roles/config_files/vars/main.yml index 3677422a..05fb9e7f 100644 --- a/docker/ansible/roles/config_files/vars/main.yml +++ b/docker/ansible/roles/config_files/vars/main.yml @@ -51,3 +51,6 @@ syslog_log_level: info rrdtool_db_dir: "/var/lib/collectd/rrd" cache_flush: 120 write_per_sec: 50 + +#additional configuration files path +additional_configs_path: "" -- 2.16.6