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] - name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER]
juniper_junos_config: junipernetworks.junos.junos_config:
load: 'replace' update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
format: text src_format: text
config_mode: "private" check_commit: true
check: true diff: true
commit: false
register: response
when: > when: >
verb == "deploy" and verb == "deploy" and
local_side.iptrunk_side_node.vendor == "juniper" and local_side.iptrunk_side_node.vendor == "juniper" and
dry_run | ansible.builtin.bool 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] - name: Deploy "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER]
juniper_junos_config: junipernetworks.junos.junos_config:
load: 'replace' update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
format: text src_format: text
config_mode: "private"
commit: true
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
register: response
when: > when: >
verb == "deploy" and verb == "deploy" and
local_side.iptrunk_side_node.vendor == "juniper" and local_side.iptrunk_side_node.vendor == "juniper" and
......
...@@ -10,33 +10,18 @@ ...@@ -10,33 +10,18 @@
when: old_wfo_trunk is defined and wfo_trunk.iptrunk.iptrunk_isis_metric != old_wfo_trunk.iptrunk.iptrunk_isis_metric 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] - name: Update ISIS metric [CHECK ONLY]
juniper_junos_config: junipernetworks.junos.junos_config:
load: 'replace' update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf" src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf"
format: text src_format: text
config_mode: "private" check_commit: true
check: true diff: true
commit: false
register: response
when: verb == "modify" and (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool) 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] - name: Update ISIS metric [FOR REAL]
juniper_junos_config: junipernetworks.junos.junos_config:
load: 'replace' update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf" src: "/var/tmp/ansible_run_{{ opid }}/isis_interface.conf"
format: text src_format: text
config_mode: "private"
commit: true
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
register: response
when: verb == "modify" and not (dry_run | ansible.builtin.bool) and (modify_metric | ansible.builtin.bool) 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] - name: Remove "{{ config_object }}" on "{{ inventory_hostname }}" [CHECK ONLY][JUNIPER]
juniper_junos_config: junipernetworks.junos.junos_config:
load: merge update: 'merge'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
format: set src_format: set
config_mode: "private" check_commit: true
check: true diff: 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 }}"
when: when:
verb == "terminate" and verb == "terminate" and
dry_run | ansible.builtin.bool and dry_run | ansible.builtin.bool and
local_side.iptrunk_side_node.vendor == "juniper" local_side.iptrunk_side_node.vendor == "juniper"
- name: Remove "{{ config_object }}" [FOR REAL] - name: Remove "{{ config_object }}" on "{{ inventory_hostname }}" [AND COMMIT][JUNIPER]
juniper_junos_config: junipernetworks.junos.junos_config:
load: merge update: 'merge'
src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf" src: "/var/tmp/ansible_run_{{ opid }}/{{ config_object }}.conf"
format: set src_format: set
config_mode: "private"
commit: true
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
register: response diff: true
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 }}"
when: when:
verb == "terminate" and verb == "terminate" and
dry_run | ansible.builtin.bool 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