Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Benjamin Graillot
scripts
Commits
8ab0dbd3
Commit
8ab0dbd3
authored
Nov 30, 2016
by
Hamza Dely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MàJ de switchs2.py : NTP et Gateway sur le VLAN Switches
parent
a066e7e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
gestion/gen_confs/switch_conf.tpl
gestion/gen_confs/switch_conf.tpl
+4
-0
gestion/gen_confs/switchs2.py
gestion/gen_confs/switchs2.py
+1
-2
No files found.
gestion/gen_confs/switch_conf.tpl
View file @
8ab0dbd3
...
...
@@ -28,7 +28,11 @@ console inactivity-timer 30
logging {{ s }}
{%- endfor %}
;--- IP du switch ---
{%- if gateway %}
ip default-gateway {{ gateway }}
{%- else %}
no ip default-gateway
{%- endif %}
{%- for vlan in vlans %}
vlan {{ vlan.id }}
name "{{ vlan.name|capitalize }}"
...
...
gestion/gen_confs/switchs2.py
View file @
8ab0dbd3
...
...
@@ -532,9 +532,8 @@ def conf_switch(hostname):
data
[
'subnet'
]
=
'255.255.255.0'
if
u
"switches"
in
unicode
(
switch
[
'host'
]):
data
[
'public'
]
=
False
data
[
'ntp_servers'
]
=
[
'10.231.100.
38
'
]
data
[
'ntp_servers'
]
=
[
'10.231.100.
102
'
]
data
[
'log_servers'
]
=
[
'10.231.100.38'
]
data
[
'gateway'
]
=
'10.231.100.4'
data
[
'network_id'
]
=
'10.231.100.0'
data
[
'subnet'
]
=
'255.255.255.0'
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment