enable logging on switches
This commit is contained in:
parent
8681e47fb3
commit
070e685350
|
@ -30,6 +30,15 @@ expect -- "-luser-admin]"
|
|||
send "quit\r"
|
||||
expect "{{ hostname }}]"
|
||||
|
||||
{# Enable logging #}
|
||||
send "info-center enable\r"
|
||||
expect "]"
|
||||
send "info-center loghost {{logging}} channel loghost facility local6\r"
|
||||
expect "]"
|
||||
send "info-center source default channel loghost log level informational\r"
|
||||
expect "]"
|
||||
|
||||
|
||||
{%- for name, vlan in pillar['vlans'].items() %}
|
||||
send "vlan {{ vlan }}\r"
|
||||
expect -- "-vlan{{ vlan }}]"
|
||||
|
|
|
@ -26,6 +26,16 @@ expect "(config)# "
|
|||
|
||||
# TODO: ssh, password
|
||||
|
||||
{# Enable Logging #}
|
||||
send "logging {{logging}}\r"
|
||||
expect "(config)# "
|
||||
send "logging facility local6\r"
|
||||
expect "(config)# "
|
||||
|
||||
# todo ntp
|
||||
# timesync sntp
|
||||
# ip timep manual {{ntp}} interval 10
|
||||
|
||||
{%- for name, vlan in pillar['vlans'].items() %}
|
||||
send "vlan {{ vlan }}\r"
|
||||
expect "(vlan-{{ vlan }})#"
|
||||
|
|
|
@ -31,6 +31,9 @@ expect "(config)#"
|
|||
send "location \"{{ switch['location'] }}\"\r"
|
||||
expect "(config)#"
|
||||
|
||||
send "logging host index 1 {{logging}} 6\r"
|
||||
expect "(config)#"
|
||||
|
||||
{%- set mgmt_vlan = pillar['vlans']['mgmt'] %}
|
||||
send "ip management-vlan {{ mgmt_vlan }}\r"
|
||||
expect "(config)#"
|
||||
|
|
Loading…
Reference in New Issue