Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GAP Ansible Collection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GAP Ansible Collection
Commits
92394810
Commit
92394810
authored
8 months ago
by
Aleksandr Kurbatov
Browse files
Options
Downloads
Patches
Plain Diff
Change ansible_connection in base_config
parent
5c5bbeaa
No related branches found
No related tags found
1 merge request
!189
Fix/ansible connection private config
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geant/gap_ansible/roles/base_config/tasks/compile_base_config.yaml
+1
-1
1 addition, 1 deletion
..._ansible/roles/base_config/tasks/compile_base_config.yaml
geant/gap_ansible/roles/base_config/tasks/main.yml
+17
-26
17 additions, 26 deletions
geant/gap_ansible/roles/base_config/tasks/main.yml
with
18 additions
and
27 deletions
geant/gap_ansible/roles/base_config/tasks/compile_base_config.yaml
+
1
−
1
View file @
92394810
...
@@ -35,6 +35,6 @@
...
@@ -35,6 +35,6 @@
-
name
:
Set back ansible_host to target terminal server
-
name
:
Set back ansible_host to target terminal server
ansible.builtin.set_fact
:
ansible.builtin.set_fact
:
ansible_host
:
"
{{
wfo_router.router.router_site.site_ts_address
}}"
ansible_host
:
"
{{
wfo_router.router.router_site.site_ts_address
}}"
ansible_connection
:
netconf
ansible_connection
:
"
{{
netconf
_access[wfo_router.router.vendor].ansible_connection
}}"
when
:
when
:
( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is
true
( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is
true
This diff is collapsed.
Click to expand it.
geant/gap_ansible/roles/base_config/tasks/main.yml
+
17
−
26
View file @
92394810
...
@@ -6,31 +6,29 @@
...
@@ -6,31 +6,29 @@
-
"
Allowed
verbs:
'compile'
and
'deploy'.
Use:
-e
'verb=$verb'."
-
"
Allowed
verbs:
'compile'
and
'deploy'.
Use:
-e
'verb=$verb'."
when
:
(verb is not defined) or (verb not in verbs)
when
:
(verb is not defined) or (verb not in verbs)
-
name
:
Fail if arguments are missing
ansible.legacy.meta
:
end_play
when
:
(verb is not defined) or (verb not in verbs)
-
name
:
Import routers variables
ansible.builtin.include_vars
:
dir
:
/opt/ansible_inventory/group_vars/routers
-
name
:
Import variables from 'all'
ansible.builtin.include_vars
:
dir
:
/opt/ansible_inventory/group_vars/all
-
name
:
Set ansible_host to terminal server when router is offline
-
name
:
Set ansible_host to terminal server when router is offline
ansible.
legacy
.set_fact
:
ansible.
builtin
.set_fact
:
ansible_host
:
"
{{
wfo_router.router.router_site.site_ts_address
}}"
ansible_host
:
"
{{
wfo_router.router.router_site.site_ts_address
}}"
ansible_port
:
"
{{
wfo_router.router.router_ts_port
}}"
ansible_port
:
"
{{
wfo_router.router.router_ts_port
}}"
when
:
when
:
( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is
true
( wfo_router.router.router_access_via_ts | ansible.builtin.bool ) is
true
# FIX: Load these vars via group_vars
-
name
:
Set variable to connect to nokia
-
name
:
Set variable to connect to nokia
ansible.legacy.set_fact
:
ansible.builtin.set_fact
:
ansible_network_os
:
geant.gap_ansible.sros
ansible_connection
:
"
{{
netconf_access[wfo_router.router.vendor].ansible_connection
}}"
ansible_connection
:
netconf
ansible_network_os
:
"
{{
netconf_access[wfo_router.router.vendor].ansible_network_os
}}"
when
:
wfo_router.router.vendor == "nokia"
-
name
:
Set variables for connecting to Junos
ansible.legacy.set_fact
:
ansible_network_os
:
junos
ansible_connection
:
netconf
when
:
wfo_router.router.vendor == "juniper"
-
name
:
Fail if arguments are missing
ansible.legacy.meta
:
end_play
when
:
(verb is not defined) or (verb not in verbs)
# FIX: this does not work with ncclient 0.6.15
# FIX: this does not work with ncclient 0.6.15
# NOTE: `gather_subset: all` breaks. Workaround to use `min`.
# NOTE: `gather_subset: all` breaks. Workaround to use `min`.
...
@@ -41,16 +39,9 @@
...
@@ -41,16 +39,9 @@
when
:
when
:
wfo_router.router.vendor == "juniper"
wfo_router.router.vendor == "juniper"
-
name
:
Import routers variables
ansible.builtin.include_vars
:
dir
:
/opt/ansible_inventory/group_vars/routers
-
name
:
Import variables from 'all'
ansible.builtin.include_vars
:
dir
:
/opt/ansible_inventory/group_vars/all
-
name
:
Generate an ID for this run
-
name
:
Generate an ID for this run
ansible.
legacy
.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)
}}"
config_is_different
:
"
False"
config_is_different
:
"
False"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment