Skip to content
Snippets Groups Projects

ibpg role: rewrote using junipernetowrk collection

Merged Aleksandr Kurbatov requested to merge ibpg_junipernetworks into develop
1 file
+ 10
26
Compare changes
  • Side-by-side
  • Inline
 
---
- name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [CHECK ONLY][Juniper]
- name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [CHECK ONLY][Juniper]
juniper_junos_config:
junipernetworks.junos.junos_config:
load: 'replace'
update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf"
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf"
format: text
src_format: text
config_mode: "private"
check_commit: true
check: true
diff: 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 }}"
when: >
when: >
( dry_run | ansible.builtin.bool ) is true and
( dry_run | ansible.builtin.bool ) is true and
vendor == "juniper"
vendor == "juniper"
- name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [AND COMMIT][Juniper]
- name: Update iBGP mesh ["{{ verb }}"] on "{{ inventory_hostname }}" [AND COMMIT][Juniper]
juniper_junos_config:
junipernetworks.junos.junos_config:
load: 'replace'
update: 'replace'
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf"
src: "/var/tmp/ansible_run_{{ opid }}/{{ verb }}.conf"
format: text
src_format: text
config_mode: "private"
comment: "{{ commit_comment }}"
comment: "{{ commit_comment }}"
register: response
diff: true
when: >
( dry_run | ansible.builtin.bool ) is false and
vendor == "juniper"
- name: Show diff
ansible.builtin.debug:
msg: "{{ response }}"
when: >
when: >
( dry_run | ansible.builtin.bool ) is false and
( dry_run | ansible.builtin.bool ) is false and
vendor == "juniper"
vendor == "juniper"
Loading