diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/deactivate_trunk_side.yaml b/geant/gap_ansible/roles/iptrunk_migration/tasks/deactivate_trunk_side.yaml index f880605aaba5eb45ca31e659c8e8497ee4599901..afeecf91c17e7ae9abc517847bfea195f10eeba1 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/tasks/deactivate_trunk_side.yaml +++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/deactivate_trunk_side.yaml @@ -1,43 +1,23 @@ --- - name: Deactivate Trunk interface on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - format: set - config_mode: "private" - check: true - commit: false - register: response + src_format: set + check_commit: true + diff: true when: > verb == "deactivate" and local_side.iptrunk_side_node.vendor == "juniper" and dry_run | ansible.builtin.bool -- name: Show DRY diff of "{{ config_object }}" - ansible.builtin.debug: - msg: "{{ response }}" - when: > - verb == "deactivate" - and dry_run | ansible.builtin.bool and - local_side.iptrunk_side_node.vendor == "juniper" - - name: Deactivate Trunk interface on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - format: set - config_mode: "private" - commit: true + src_format: set comment: "{{ commit_comment }}" - register: response - when: > - verb == "deactivate" and - local_side.iptrunk_side_node.vendor == "juniper" and - not (dry_run | ansible.builtin.bool) - -- name: Show real diff of "{{ config_object }}" - ansible.builtin.debug: - msg: "{{ response }}" + diff: true when: > verb == "deactivate" and local_side.iptrunk_side_node.vendor == "juniper" and diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/delete_trunk_side.yaml b/geant/gap_ansible/roles/iptrunk_migration/tasks/delete_trunk_side.yaml index 9adaafab2d3f0dd5d933b4c999276b2acad883e9..ec7b2da440a2d55afd08349d97831b13ec73b129 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/tasks/delete_trunk_side.yaml +++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/delete_trunk_side.yaml @@ -1,43 +1,23 @@ --- - name: Delete Trunk interface on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - format: set - config_mode: "private" - check: true - commit: false - register: response + src_format: set + check_commit: true + diff: true when: > verb == "delete" and local_side.iptrunk_side_node.vendor == "juniper" and dry_run | ansible.builtin.bool -- name: Show DRY diff of "{{ config_object }}" - ansible.builtin.debug: - msg: "{{ response }}" - when: > - verb == "delete" - and dry_run | ansible.builtin.bool and - local_side.iptrunk_side_node.vendor == "juniper" - - name: Delete Trunk interface on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - format: set - config_mode: "private" - commit: true + src_format: set comment: "{{ commit_comment }}" - register: response - when: > - verb == "delete" and - local_side.iptrunk_side_node.vendor == "juniper" and - not (dry_run | ansible.builtin.bool) - -- name: Show real diff of "{{ config_object }}" - ansible.builtin.debug: - msg: "{{ response }}" + diff: true when: > verb == "delete" and local_side.iptrunk_side_node.vendor == "juniper" and diff --git a/geant/gap_ansible/roles/iptrunk_migration/tasks/deploy_object.yaml b/geant/gap_ansible/roles/iptrunk_migration/tasks/deploy_object.yaml index 7b4731a80f5afac1fd77cafd7a8d3a8aea01fc52..9aba18efae277b2060d2163f5db0d366ca7e23c3 100644 --- a/geant/gap_ansible/roles/iptrunk_migration/tasks/deploy_object.yaml +++ b/geant/gap_ansible/roles/iptrunk_migration/tasks/deploy_object.yaml @@ -1,43 +1,23 @@ --- - name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - format: text - config_mode: "private" - check: true - commit: false - register: response + src_format: set + check_commit: true + diff: true when: > verb == "deploy" and new_node.router.vendor == "juniper" and dry_run | ansible.builtin.bool -- name: Show DRY diff of "{{ config_object }}" - ansible.builtin.debug: - msg: "{{ response }}" - when: > - verb == "deploy" - and dry_run | ansible.builtin.bool and - new_node.router.vendor == "juniper" - - name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER] - juniper_junos_config: - load: 'replace' + junipernetworks.junos.junos_config: + update: 'replace' src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" - format: text - config_mode: "private" - commit: true + src_format: set comment: "{{ commit_comment }}" - register: response - when: > - verb == "deploy" and - new_node.router.vendor == "juniper" and - not (dry_run | ansible.builtin.bool) - -- name: Show real diff of "{{ config_object }}" - ansible.builtin.debug: - msg: "{{ response }}" + diff: true when: > verb == "deploy" and new_node.router.vendor == "juniper" and