Skip to content
Snippets Groups Projects
Commit 9f42c3df authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Merge branch 'iptrunk_role_junipernetworks' into 'develop'

IPtrunk role: replace Juniper.junos with junipernetworks

See merge request !92
parents e1c4e83f 51ca32f0
No related branches found
No related tags found
1 merge request!92IPtrunk role: replace Juniper.junos with junipernetworks
Pipeline #85579 passed
---
- 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: text
check_commit: true
diff: true
when: >
verb == "deploy" 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 == "deploy"
and dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.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: text
comment: "{{ commit_comment }}"
register: response
when: >
verb == "deploy" and
local_side.iptrunk_side_node.vendor == "juniper" and
......
......@@ -10,33 +10,18 @@
when: old_wfo_trunk is defined and wfo_trunk.iptrunk.iptrunk_isis_metric != old_wfo_trunk.iptrunk.iptrunk_isis_metric
- name: Update ISIS metric [CHECK ONLY]
juniper_junos_config:
load: 'replace'
junipernetworks.junos.junos_config:
update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf"
format: text
config_mode: "private"
check: true
commit: false
register: response
src_format: text
check_commit: true
diff: true
when: verb == "modify" and (dry_run | ansible.builtin.bool) and (modify_metric | 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 (modify_metric | ansible.builtin.bool)
- name: Update ISIS metric [FOR REAL]
juniper_junos_config:
load: 'replace'
junipernetworks.junos.junos_config:
update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf"
format: text
config_mode: "private"
commit: true
src_format: text
comment: "{{ commit_comment }}"
register: response
when: verb == "modify" and not (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool)
- name: Show real diff of "{{ config_object }}"
ansible.builtin.debug:
msg: "{{ response }}"
when: verb == "deploy" and not (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool)
---
- name: Remove "{{ config_object }}" [CHECK ONLY]
juniper_junos_config:
load: merge
- name: Remove "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER]
junipernetworks.junos.junos_config:
update: 'merge'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
format: set
config_mode: "private"
check: true
commit: false
register: response
when:
verb == "terminate" and
dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.vendor == "juniper"
- name: Show DRY diff of "{{ config_object }}"
ansible.builtin.debug:
msg: "{{ response }}"
src_format: set
check_commit: true
diff: true
when:
verb == "terminate" and
dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.vendor == "juniper"
- name: Remove "{{ config_object }}" [FOR REAL]
juniper_junos_config:
load: merge
- name: Remove "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER]
junipernetworks.junos.junos_config:
update: 'merge'
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 == "terminate" and
not (dry_run | ansible.builtin.bool) and
local_side.iptrunk_side_node.vendor == "juniper"
- name: Show real diff of "{{ config_object }}"
ansible.builtin.debug:
msg: "{{ response }}"
diff: true
when:
verb == "terminate" and
dry_run | ansible.builtin.bool and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment