From 5f8258d60bae6d2e608f52c616c32c9b6cb50e14 Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342.local> Date: Tue, 30 Jan 2024 19:40:05 +0000 Subject: [PATCH] ibpg role: rewrote using junipernetowrk collection --- .../roles/ibgp_update/tasks/deploy.yaml | 36 ++++++------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml b/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml index 6bd85804..f187be95 100644 --- a/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml +++ b/geant/gap_ansible/roles/ibgp_update/tasks/deploy.yaml @@ -1,38 +1,22 @@ +--- - name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [CHECK ONLY][Juniper] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" - format: text - config_mode: "private" - check: true - commit: false - register: response - when: > - ( dry_run | ansible.builtin.bool ) is true and - vendor == "juniper" - -- name: Show diff for dry run - ansible.builtin.debug: - msg: "{{ response }}" + src_format: text + check_commit: true + diff: true when: > ( dry_run | ansible.builtin.bool ) is true and vendor == "juniper" - name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [AND COMMIT][Juniper] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf" - format: text - config_mode: "private" + src_format: text comment: "{{ commit_comment }}" - register: response - when: > - ( dry_run | ansible.builtin.bool ) is false and - vendor == "juniper" - -- name: Show diff - ansible.builtin.debug: - msg: "{{ response }}" + diff: true when: > ( dry_run | ansible.builtin.bool ) is false and vendor == "juniper" -- GitLab