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
Branches
Tags
1 merge request!151use of defaults inside role
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
diff: true diff: true
register: output register: output
when: > when: >
verb == "deploy" and verb == "deploy"
( dry_run | ansible.builtin.bool ) is true and and
( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "juniper" wfo_router.router.vendor == "juniper"
...@@ -20,8 +22,10 @@ ...@@ -20,8 +22,10 @@
comment: "{{ commit_comment }}" comment: "{{ commit_comment }}"
diff: true diff: true
when: > when: >
verb == "deploy" and verb == "deploy"
( dry_run | ansible.builtin.bool ) is false and and
not ( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "juniper" wfo_router.router.vendor == "juniper"
- name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA] - name: Deploy base_config on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
...@@ -36,11 +40,14 @@ ...@@ -36,11 +40,14 @@
register: output register: output
check_mode: true check_mode: true
when: > when: >
verb == "deploy" and verb == "deploy"
( dry_run | ansible.builtin.bool ) is true and and
( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia" wfo_router.router.vendor == "nokia"
- name: Fail if there is any diff
- name: Fail if there is any diff
ansible.builtin.fail: ansible.builtin.fail:
msg: There are diffs!!!! msg: There are diffs!!!!
when: > when: >
...@@ -53,8 +60,10 @@ ...@@ -53,8 +60,10 @@
ansible.builtin.debug: ansible.builtin.debug:
msg: "Base config has been validated against the router and no syntax errors were found" msg: "Base config has been validated against the router and no syntax errors were found"
when: > when: >
verb == "deploy" and verb == "deploy"
( dry_run | ansible.builtin.bool ) is true and and
( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia" wfo_router.router.vendor == "nokia"
...@@ -69,14 +78,18 @@ ...@@ -69,14 +78,18 @@
diff: true diff: true
check_mode: false check_mode: false
when: > when: >
verb == "deploy" and verb == "deploy"
( dry_run | ansible.builtin.bool ) is false and and
not ( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia" wfo_router.router.vendor == "nokia"
- name: PLEASE CHECK THE CONFIG ON THE BOX - name: PLEASE CHECK THE CONFIG ON THE BOX
ansible.builtin.debug: ansible.builtin.debug:
msg: "Base config has been deployed, check on the router for the result" msg: "Base config has been deployed, check on the router for the result"
when: > when: >
verb == "deploy" and verb == "deploy"
( dry_run | ansible.builtin.bool ) is false and and
not ( dry_run | ansible.builtin.bool )
and
wfo_router.router.vendor == "nokia" 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