From 667715383df7570b809c7e9db87f8918c0f0f5ac Mon Sep 17 00:00:00 2001 From: tgodaA Date: Fri, 10 Jun 2022 16:41:32 -0400 Subject: [PATCH] Fix(eos_designs, eos_cli_config_gen): Fix the AVD version print in virtual environments --- .../arista/avd/roles/eos_cli_config_gen/tasks/main.yml | 2 +- .../arista/avd/roles/eos_config_deploy_cvp/tasks/v1/main.yml | 2 +- .../arista/avd/roles/eos_config_deploy_cvp/tasks/v3/main.yml | 2 +- .../arista/avd/roles/eos_config_deploy_eapi/tasks/main.yml | 2 +- ansible_collections/arista/avd/roles/eos_designs/tasks/main.yml | 2 +- .../arista/avd/roles/eos_snapshot/tasks/main.yml | 2 +- .../arista/avd/roles/eos_validate_state/tasks/main.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/tasks/main.yml b/ansible_collections/arista/avd/roles/eos_cli_config_gen/tasks/main.yml index 13b45095ac9..6630e84ca7b 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/tasks/main.yml +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/tasks/main.yml @@ -4,7 +4,7 @@ set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}" diff --git a/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v1/main.yml b/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v1/main.yml index fc16a5bd0c2..481474cbaf7 100644 --- a/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v1/main.yml +++ b/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v1/main.yml @@ -6,7 +6,7 @@ set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}" diff --git a/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/main.yml b/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/main.yml index 3c5e5672464..6c4b1366780 100644 --- a/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/main.yml +++ b/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/main.yml @@ -4,7 +4,7 @@ set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}" diff --git a/ansible_collections/arista/avd/roles/eos_config_deploy_eapi/tasks/main.yml b/ansible_collections/arista/avd/roles/eos_config_deploy_eapi/tasks/main.yml index 7029ae719e9..006b42a47a9 100644 --- a/ansible_collections/arista/avd/roles/eos_config_deploy_eapi/tasks/main.yml +++ b/ansible_collections/arista/avd/roles/eos_config_deploy_eapi/tasks/main.yml @@ -4,7 +4,7 @@ set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}" diff --git a/ansible_collections/arista/avd/roles/eos_designs/tasks/main.yml b/ansible_collections/arista/avd/roles/eos_designs/tasks/main.yml index a8a94457bd2..06260920dc4 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/tasks/main.yml +++ b/ansible_collections/arista/avd/roles/eos_designs/tasks/main.yml @@ -4,7 +4,7 @@ ansible.builtin.set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}" diff --git a/ansible_collections/arista/avd/roles/eos_snapshot/tasks/main.yml b/ansible_collections/arista/avd/roles/eos_snapshot/tasks/main.yml index 4d4a801f746..14a7e3aceb8 100644 --- a/ansible_collections/arista/avd/roles/eos_snapshot/tasks/main.yml +++ b/ansible_collections/arista/avd/roles/eos_snapshot/tasks/main.yml @@ -5,7 +5,7 @@ set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}" diff --git a/ansible_collections/arista/avd/roles/eos_validate_state/tasks/main.yml b/ansible_collections/arista/avd/roles/eos_validate_state/tasks/main.yml index 739e47b47cc..5247f82a318 100644 --- a/ansible_collections/arista/avd/roles/eos_validate_state/tasks/main.yml +++ b/ansible_collections/arista/avd/roles/eos_validate_state/tasks/main.yml @@ -4,7 +4,7 @@ set_fact: avd_collection_version: version vars: - versions: "{{ lookup('pipe', 'ansible-galaxy collection list --format yaml ' ~ ansible_collection_name) | from_yaml }}" + versions: "{{ lookup('pipe', 'ansible-galaxy collection list -p ' ~ collection_path ~ ' --format yaml ' ~ ansible_collection_name) | from_yaml }}" collection_path: "{{ (role_path | split('/'))[0:-4] | join('/') }}" version: "{{ versions[collection_path][ansible_collection_name].version | default('Unknown') }}" git_tag: "{{ lookup('pipe', 'git -C ' ~ collection_path ~ ' describe --tags --always 2>/dev/null', errors='ignore') }}"