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

main: general cleanup

parent c8dd21df
No related branches found
No related tags found
1 merge request!111deactivate_trunk_side: module update
...@@ -21,14 +21,6 @@ ...@@ -21,14 +21,6 @@
opid: "{{ lookup('community.general.random_string', length=18, special=false) }}" opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
config_is_different: "False" config_is_different: "False"
- name: Lets take a look at trunk
ansible.builtin.debug:
msg: "{{ wfo_trunk }}"
# - name: Lets take a look at trunk
# ansible.builtin.debug:
# msg: "{{ trunks[0] }}"
- name: The old node is - name: The old node is
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ old_node }}" msg: "{{ old_node }}"
...@@ -62,26 +54,23 @@ ...@@ -62,26 +54,23 @@
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ opid }}" msg: "{{ opid }}"
- name: Include compiling the template - name: Include compiling the template for the old node
ansible.builtin.include_tasks: compile_template.yaml ansible.builtin.include_tasks: compile_template.yaml
when: verb == "deactivate" and inventory_hostname == old_node when: (verb == "deactivate" or verb == "delete")
and inventory_hostname == old_node
- name: Include compiling the template
ansible.builtin.include_tasks: compile_template.yaml
when: verb == "delete" and inventory_hostname == old_node
- name: Include compiling the template - name: Include deactivation tasks for the old node
ansible.builtin.include_tasks: compile_template.yaml
when: verb == "deploy" and inventory_hostname == new_node.router.router_fqdn
- name: Include the modification tasks if specified
ansible.builtin.include_tasks: deactivate_trunk_side.yaml ansible.builtin.include_tasks: deactivate_trunk_side.yaml
when: verb == "deactivate" and inventory_hostname == old_node when: verb == "deactivate" and inventory_hostname == old_node
- name: Include the removal tasks if specified - name: Include removal tasks for the old node
ansible.builtin.include_tasks: delete_trunk_side.yaml ansible.builtin.include_tasks: delete_trunk_side.yaml
when: verb == "delete" and inventory_hostname == old_node when: verb == "delete" and inventory_hostname == old_node
- name: Include compiling the template for the new node
ansible.builtin.include_tasks: compile_template.yaml
when: verb == "deploy" and inventory_hostname == new_node.router.router_fqdn
- name: Include the deployment tasks if specified - name: Include the deployment tasks if specified
ansible.builtin.include_tasks: deploy_object.yaml ansible.builtin.include_tasks: deploy_object.yaml
when: verb == "deploy" and inventory_hostname == new_node.router.router_fqdn when: verb == "deploy" and inventory_hostname == new_node.router.router_fqdn
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment