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 +