From 8f657f886229642957a110243a502ea72b322180 Mon Sep 17 00:00:00 2001 From: Greg Szabo Date: Tue, 19 Sep 2017 13:18:22 -0400 Subject: [PATCH] Added getfile ansible playbook --- ansible/getfile.yml | 9 +++++++++ ansible/roles/getfile/tasks/main.yml | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 ansible/getfile.yml create mode 100644 ansible/roles/getfile/tasks/main.yml diff --git a/ansible/getfile.yml b/ansible/getfile.yml new file mode 100644 index 000000000..c1c96f66a --- /dev/null +++ b/ansible/getfile.yml @@ -0,0 +1,9 @@ +--- + +#variable "service" is required +#variable "source" is required + +- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}" + roles: + - getfile + diff --git a/ansible/roles/getfile/tasks/main.yml b/ansible/roles/getfile/tasks/main.yml new file mode 100644 index 000000000..7f3156fc1 --- /dev/null +++ b/ansible/roles/getfile/tasks/main.yml @@ -0,0 +1,6 @@ +--- + +- name: Get file from node + fetch: "dest={{ destination | default('.') }}/{{ source | basename }} flat=yes src='{{source}}'" + run_once: yes +