Skip to content

Commit

Permalink
Fix tc-inventory role for CBIS 22
Browse files Browse the repository at this point in the history
Change-Id: I38fbcfe4c2ac6b449b096a500bbf171044249d9d
Closes-Bug: OPENSTACK-3062
  • Loading branch information
Vlad Gridin committed Sep 11, 2023
1 parent 407c37a commit d5774e3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions nuage_topology_collector/roles/tc-inventory/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
- name: fetch overcloud node names and IPs
shell: >
source {{ undercloud_env_file }};
$(command -v python3 || command -v python2) /tmp/get-overcloud-nodes.py
if python3 -c 'import novaclient.client' > /dev/null 2>&1; then
python3 /tmp/get-overcloud-nodes.py
else
python2 /tmp/get-overcloud-nodes.py
fi
register: registered_overcloud_nodes

- name: copy get-overcloud-agents.py to undercloud
Expand All @@ -16,10 +20,14 @@
dest: '/tmp/get-overcloud-agents.py'
mode: 0755

- name: fetch agents
- name: fetch overcloud agents
shell: >
source {{ osc_env_file }};
$(command -v python3 || command -v python2) /tmp/get-overcloud-agents.py
if python3 -c 'import neutronclient.v2_0.client' > /dev/null 2>&1; then
python3 /tmp/get-overcloud-agents.py
else
python2 /tmp/get-overcloud-agents.py
fi
register: registered_overcloud_agents

- name: set overcloud hosts fact
Expand Down

0 comments on commit d5774e3

Please sign in to comment.