From 3445e990ea7fc3d2feb8807fe6e651b2266e7d56 Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <ak@geant.org> Date: Sat, 26 Apr 2025 13:46:47 +0100 Subject: [PATCH] `edge_port` - use common `configure_storage` tasklist --- .../edge_port/tasks/configure_storage.yaml | 1 + .../roles/edge_port/tasks/main.yml | 3 +++ .../roles/edge_port/tasks/standard_tasks.yaml | 19 ------------------- 3 files changed, 4 insertions(+), 19 deletions(-) create mode 120000 geant/gap_ansible/roles/edge_port/tasks/configure_storage.yaml diff --git a/geant/gap_ansible/roles/edge_port/tasks/configure_storage.yaml b/geant/gap_ansible/roles/edge_port/tasks/configure_storage.yaml new file mode 120000 index 00000000..67d67dcb --- /dev/null +++ b/geant/gap_ansible/roles/edge_port/tasks/configure_storage.yaml @@ -0,0 +1 @@ +../../../playbooks/configure_storage.yaml \ No newline at end of file diff --git a/geant/gap_ansible/roles/edge_port/tasks/main.yml b/geant/gap_ansible/roles/edge_port/tasks/main.yml index 51164357..2381bf69 100644 --- a/geant/gap_ansible/roles/edge_port/tasks/main.yml +++ b/geant/gap_ansible/roles/edge_port/tasks/main.yml @@ -3,6 +3,9 @@ - name: Include Standard role tasks ansible.builtin.include_tasks: standard_tasks.yaml +- name: Include configure storage tasks + ansible.builtin.include_tasks: configure_storage.yaml + - name: Include templates compilation when: verb in verbs ansible.builtin.include_tasks: compile.yaml diff --git a/geant/gap_ansible/roles/edge_port/tasks/standard_tasks.yaml b/geant/gap_ansible/roles/edge_port/tasks/standard_tasks.yaml index 6d29f548..413c0516 100644 --- a/geant/gap_ansible/roles/edge_port/tasks/standard_tasks.yaml +++ b/geant/gap_ansible/roles/edge_port/tasks/standard_tasks.yaml @@ -27,22 +27,3 @@ - name: Import variables for Edge Ports hold times ansible.builtin.include_vars: file: /opt/ansible_inventory/group_vars/routers/nokia/edge_ports.yaml - -- name: Generate an ID for this run - ansible.builtin.set_fact: - opid: "{{ lookup('community.general.random_string', length=18, special=false) }}" - -- name: Print the ID - ansible.builtin.debug: - msg: "{{ opid }}" - -- name: Generate FS path for artifacts storage - ansible.builtin.set_fact: - play_storage_path: "{{ storage_mount_prefix | default('/var/tmp') }}/{{ gso_process_id | default('gso_pid_undefined') }}/ansible_run_{{ opid }}" - -- name: Create a folder for all compiled output - ansible.builtin.file: - path: "{{ play_storage_path }}" - state: directory - mode: '0755' - delegate_to: localhost -- GitLab