Skip to content

Commit

Permalink
Bug fix: Check IOS XR management IP address only for libvirt provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Mar 16, 2024
1 parent 256eb76 commit dfc7631
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netsim/ansible/tasks/iosxr/initial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: "Get current IOS XR IP address from Vagrant"
shell: "vagrant ssh-config {{ inventory_hostname }}|grep -i hostname|grep -o '[0-9.]*'"
register: ssh_config
when: netlab_provider == 'libvirt'

# Add secondary IP address to the IOS XR management interface if the DHCP server gave
# it an unexpected IP address due to its use of ASCII DHCP client ID
Expand All @@ -19,7 +20,7 @@
lines:
- ip address {{ mgmt.ipv4 }} 255.255.255.0 secondary

when: ansible_host != ssh_config.stdout
when: netlab_provider == 'libvirt' and ssh_config is defined and ansible_host != ssh_config.stdout

- name: "iosxr_config: deploying initial config from {{ config_template }}"
iosxr_config:
Expand Down

0 comments on commit dfc7631

Please sign in to comment.