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

Split standard tasks into 2

Standard_tasks: contains all the usage and ID calculations
connection_tasks: connection vars manipulation
parent ca73f1d6
No related branches found
No related tags found
1 merge request!184Updates to the edge_port role
---
- name: Set ansible_host to terminal server when router is offline
when: router.router_access_via_ts | ansible.builtin.bool
ansible.builtin.set_fact:
ansible_host: "{{ router.router_site.site_ts_address }}"
ansible_port: "{{ router.router_ts_port }}"
- name: Load netconf connection config
ansible.builtin.set_fact:
ansible_connection: "{{ netconf_access[router.vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[router.vendor].ansible_network_os }}"
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
when: verb in verbs when: verb in verbs
ansible.builtin.include_tasks: compile.yaml ansible.builtin.include_tasks: compile.yaml
- name: Include create if selected - name: Include set connection tasks
ansible.builtin.include_tasks: connection_tasks.yaml
- name: Include deploy tasks
when: verb in verbs when: verb in verbs
ansible.builtin.include_tasks: deploy.yaml ansible.builtin.include_tasks: deploy.yaml
...@@ -24,17 +24,6 @@ ...@@ -24,17 +24,6 @@
ansible.builtin.include_vars: ansible.builtin.include_vars:
dir: /opt/ansible_inventory/group_vars/all dir: /opt/ansible_inventory/group_vars/all
- name: Set ansible_host to terminal server when router is offline
when: router.router_access_via_ts | ansible.builtin.bool
ansible.builtin.set_fact:
ansible_host: "{{ router.router_site.site_ts_address }}"
ansible_port: "{{ router.router_ts_port }}"
- name: Load netconf connection config
ansible.builtin.set_fact:
ansible_connection: "{{ netconf_access[router.vendor].ansible_connection }}"
ansible_network_os: "{{ netconf_access[router.vendor].ansible_network_os }}"
- name: Generate an ID for this run - name: Generate an ID for this run
ansible.builtin.set_fact: ansible.builtin.set_fact:
opid: "{{ lookup('community.general.random_string', length=18, special=false) }}" opid: "{{ lookup('community.general.random_string', length=18, special=false) }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment