Skip to content
Snippets Groups Projects
Commit 0c13df58 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov Committed by Aleksandr Kurbatov
Browse files

deploy_base_config: style update

parent 2f86989f
No related branches found
No related tags found
1 merge request!151use of defaults inside role
......@@ -7,8 +7,10 @@
diff: true
register: output
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is true and
verb == "deploy"
and
( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "juniper"
......@@ -20,8 +22,10 @@
comment: "{{ commit_comment }}"
diff: true
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is false and
verb == "deploy"
and
not ( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "juniper"
- name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
......@@ -36,11 +40,14 @@
register: output
check_mode: true
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is true and
verb == "deploy"
and
( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia"
- name: Fail if there is any diff
- name: Fail if there is any diff
ansible.builtin.fail:
msg: There are diffs!!!!
when: >
......@@ -53,8 +60,10 @@
ansible.builtin.debug:
msg: "Base config has been validated against the router and no syntax errors were found"
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is true and
verb == "deploy"
and
( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia"
......@@ -69,14 +78,18 @@
diff: true
check_mode: false
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is false and
verb == "deploy"
and
not ( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia"
- name: PLEASE CHECK THE CONFIG ON THE BOX
ansible.builtin.debug:
msg: "Base config has been deployed, check on the router for the result"
when: >
verb == "deploy" and
( dry_run | ansible.builtin.bool ) is false and
verb == "deploy"
and
not ( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment