From 2a651c900e45bc48bab81478a68e9bef89c5b6cb Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342.local> Date: Thu, 7 Mar 2024 15:39:17 +0000 Subject: [PATCH] Update in vars Unpacking `old_node` from GSO for convinience. --- .../roles/iptrunk_migration/tasks/compile_template.yaml | 4 ++-- geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml | 2 +- geant/gap_ansible/roles/iptrunk_migration/vars/main.yml | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/compile_template.yaml b/geant/gap_ansible/roles/iptrunk_migration/tasks/compile_template.yaml index 0d645ce6..da370805 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/tasks/compile_template.yaml +++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/compile_template.yaml @@ -20,9 +20,9 @@ mode: '0755' delegate_to: localhost -- name: Print template for the old node "{{ old_node_fqdn }}" in "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" +- name: Print template for the old node "{{ old_node.fqdn }}" in "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" ansible.builtin.template: - src: "{{ old_node_vendor }}/{{ config_object }}.j2" + src: "{{ old_node.vendor }}/{{ config_object }}.j2" dest: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" lstrip_blocks: true trim_blocks: true diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml b/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml index 6de46b5a..2d3c1b95 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml +++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/main.yml @@ -23,7 +23,7 @@ - name: The old node is ansible.builtin.debug: - msg: "{{ old_node }}" + msg: "{{ old_node.fqdn }}" - name: The new node is ansible.builtin.debug: diff --git a/geant/gap_ansible/roles/iptrunk_migration/vars/main.yml b/geant/gap_ansible/roles/iptrunk_migration/vars/main.yml index 2abc10e4..2fdb3232 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/vars/main.yml +++ b/geant/gap_ansible/roles/iptrunk_migration/vars/main.yml @@ -21,7 +21,9 @@ side_a_ipv6_address: "{{ wfo_trunk.iptrunk.iptrunk_ipv6_network | ansible.utils. side_b_ipv4_address: "{{ wfo_trunk.iptrunk.iptrunk_ipv4_network | ansible.utils.ipaddr('net') | ansible.utils.ipaddr('1') | ansible.utils.ipaddr('address') }}/31" side_b_ipv6_address: "{{ wfo_trunk.iptrunk.iptrunk_ipv6_network | ansible.utils.ipaddr('net') | ansible.utils.ipaddr('2') | ansible.utils.ipaddr('address') }}/126" -old_node: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_node.router_fqdn }}" +old_node: + fqdn: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_node.router_fqdn }}" + vendor: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_node.vendor }}" new_side: id: "{{ wfo_trunk.iptrunk.geant_s_sid }}" @@ -35,5 +37,5 @@ new_side: loopback: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_node.router_lo_ipv4_address }}" ae_name: "{{ new_lag_interface }}" members: "{{ new_lag_member_interfaces }}" - members_descriptions: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_ae_members_description }}" + # members_descriptions: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_ae_members_description }}" port_sid: "{{ wfo_trunk.iptrunk.iptrunk_sides[replace_index | int].iptrunk_side_ae_geant_a_sid }}" -- GitLab