From 80d56d9f7442b132cadd87616b0ae9b9656e0de8 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 3 Sep 2024 13:44:18 +0200 Subject: [PATCH] Add artifact --- artifacts/download_dataset.yaml | 21 +++++++++++++++++++++ custom_types.yaml | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 artifacts/download_dataset.yaml diff --git a/artifacts/download_dataset.yaml b/artifacts/download_dataset.yaml new file mode 100644 index 0000000..706f21e --- /dev/null +++ b/artifacts/download_dataset.yaml @@ -0,0 +1,21 @@ +--- +- name: Install datahugger and download dataset + hosts: localhost + vars: + ansible_python_interpreter: /usr/bin/python3 + tasks: + - name: Ensure python3-pip is installed + ansible.builtin.package: + name: python3-pip + state: present + + - name: Install datahugger Python module + ansible.builtin.pip: + name: datahugger + state: present + executable: pip3 + + - name: Download the dataset + grycap.dataset.download_dataset: + dataset_url: "{{ dataset_url }}" + output_dir: "{{ output_dir }}" diff --git a/custom_types.yaml b/custom_types.yaml index 9badfba..2a7d9d2 100644 --- a/custom_types.yaml +++ b/custom_types.yaml @@ -1954,7 +1954,7 @@ node_types: interfaces: Standard: configure: - implementation: https://raw.githubusercontent.com/AntonioSanch3z/datahugger_module/master/playbooks/download_dataset.yaml + implementation: https://raw.githubusercontent.com/grycap/tosca/datasets/artifacts/lrms/download_dataset.yaml inputs: dataset_url: { get_property: [ SELF, dataset, identifier ] } output_dir: { get_property: [ SELF, dest ] }