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

add support for validation into role

parent 15eb51e8
No related branches found
No related tags found
1 merge request!184Updates to the edge_port role
---
- name: Perform "{{ verb }}" Edge port on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
when: >-
dry_run | ansible.builtin.bool
......@@ -7,10 +8,21 @@
content: "{{ lookup('ansible.builtin.template', '{{ router.vendor }}/edge_port_{{ verb }}.j2') }}"
commit: true
validate: true
config_mode: private
diff: true
register: output
check_mode: true
- name: Fail if there is any diff
ansible.builtin.fail:
msg: Base config drift detected!!!
when: >
output.changed | ansible.builtin.bool
and
is_verification_workflow | ansible.builtin.bool
- name: Perform "{{ verb }}" Edge port on "{{ inventory_hostname }}" [FOR REAL][NOKIA]
when: >-
not (dry_run | ansible.builtin.bool)
......@@ -19,7 +31,8 @@
default_operation: merge
content: "{{ lookup('ansible.builtin.template', '{{ router.vendor }}/edge_port_{{ verb }}.j2') }}"
commit: true
validate: true
commit_comment: "{{ commit_comment }}"
config_mode: private
diff: true
register: output
check_mode: false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment