Name: puppet-netdev-stdlib-junos
Owner: Juniper Networks
Description: Junos specific Provider code for "netdev_stdlib". Netdev is a vendor-neutral network abstraction framework developed by Juniper Networks and contributed freely to the DevOps community.
Created: 2013-03-17 20:21:40.0
Updated: 2017-06-07 04:39:51.0
Pushed: 2016-07-07 17:03:10.0
Size: 94
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Netdev is a vendor-neutral network abstraction framework developed by Juniper Networks and contributed freely to the DevOps community
This module contains the Junos specific Provider code implementing the Resource Types defined in netdevops/netdev_stdlib
This module has been tested against Puppet agent 2.7.19 and 3.6.1. Here is a short example of a static manifest for a Junos EX switch. This example assumes that you've also installed the Puppet stdlib module as this example uses the keys function.
"myswitch1234.mycorp.com" {
tdev_device { $hostname: }
lans = {
'Blue' => { vlan_id => 100, description => "This is a Blue vlan" },
'Green' => { vlan_id => 101, description => "This is a Green vLAN" },
'Purple' => { vlan_id => 102, description => "This is a Puple vlan" },
'Red' => { vlan_id => 103, description => "This is a Red vlan" },
'Yellow' => { vlan_id => 104, description => "This is a Yellow vlan" }
eate_resources( netdev_vlan, $vlans )
ccess_ports = [
'ge-0/0/0',
'ge-0/0/1',
'ge-0/0/2'
plink_ports = [
'xe-0/0/0',
'xe-0/0/2'
tdev_l2_interface { $access_ports:
untagged_vlan => Blue
tdev_l2_interface { $uplink_ports:
tagged_vlans => keys( $vlans )
service variables passed in template file
ervices = [ [ 'ftp' ], [ 'ssh' ], [ 'telnet' ], [ 'netconf', 'ssh' ] ]
tdev_stdlib_junos::apply_group{ "services_group":
template_path => "netdev_stdlib_junos/services.set.erb",
active => true,
ensure => present,
Syslog variable passed in 'syslog.text.erb' template file
yslog_names = {
essages' => [ { 'facility' => 'any', 'level' => 'critical' }, { 'facility' => 'authorization', 'level' => 'info' } ] ,
nteractive-commands' => [ { 'facility' => 'interactive-commands', 'level' => 'error'} ]
tdev_stdlib_junos::apply_group{ "syslog_group":
template_path => "netdev_stdlib_junos/syslog.text.erb",
active => true,
ensure => present,
Event-policy variable passed in 'event-options.xml.erb' template file
olicy = {
'p1' => {
'events' => [ 'TEST' ],
'action' => 'then',
'event-script' => 'hello.slax'
}
}
vent_script = [ 'hello.slax' ]
file resource copies the file hello.slax from master to agent
le { '/var/db/scripts/event/hello.slax':
mode => 0644,
source => "puppet:///modules/netdev_stdlib_junos/junoscripts/event/hello.slax",
Configure event policy and event script
tdev_stdlib_junos::apply_group{ "event_options_group":
template_path => "netdev_stdlib_junos/event-options.xml.erb",
active => true,
ensure => present,
See RESOURCE-STDLIB.md for documentation and usage examples
Juniper Networks is actively contributing to and maintaining this repo. Please contact jnpr-community-netdev@juniper.net for any queries.
Contributors:
Former Contributors:
See LICENSE