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]
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"
Loading