Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kypo-interface
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Insights
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
MUNI-KYPO-CRP
backend-python
ansible-networking-stage
kypo-interface
Commits
1c39247c
Commit
1c39247c
authored
5 years ago
by
Kamil Andoniadis
Browse files
Options
Downloads
Patches
Plain Diff
add default variables
parent
eabe9b0e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+10
-0
10 additions, 0 deletions
defaults/main.yml
tasks/main.yml
+5
-2
5 additions, 2 deletions
tasks/main.yml
with
15 additions
and
2 deletions
defaults/main.yml
+
10
−
0
View file @
1c39247c
...
...
@@ -12,3 +12,13 @@ interface_file: '
interface_clean
:
True
interface_mtu
:
1442
interface_mac
:
interface_default_gateway
:
interface_routes
:
[]
# - gateway:
# network:
# mask:
interface_required_variables
:
interface_mac
:
'
{{
interface_mac
}}'
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
5
−
2
View file @
1c39247c
-
name
:
check existence of required variables
fail
:
msg
:
interface_mac is not defined
when
:
not interface_mac
msg
:
required variable '{{ item.key }}' is undefined
when
:
item.value is undefined or not item.value
loop
:
'
{{
interface_required_variables
}}'
-
set_fact
:
interface_device
:
'
{%-
from
"roles/common/templates/network.j2"
import
mac_to_interface
with
context
-%}
...
...
@@ -11,3 +13,4 @@
when
:
interface_clean is defined and interface_clean
-
include
:
interface.yml
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