Cisco VLAN

11 views
Skip to first unread message

Matthew Ceroni

unread,
Jul 21, 2015, 4:33:18 PM7/21/15
to puppet...@googlegroups.com
I am using the VLAN resource type to manage VLANs on a Cisco 4500.

On every run puppet reports that it created the VLAN (even though it exists). 

Grabbing data from hiera:

network::layer3::vlans:
  site:
    name: 703
    description: 'Site'
  management:
    name: 712
    description: 'Managment'

Then in my manifest:

class profiles::cisco::layer3_vlan {

  # site level VLANs
  $site_vlans        = hiera('network::layer3::vlans')

  $defaults = {
    'ensure' => present,
  }

  create_resources('vlan', $site_vlans, $defaults)

}

Device.conf is:

[op1cor01.op1]
  type cisco
  url ssh://user:Pa...@op1cor01.op1/

Or is that the way that resource type works? Just meant to be run once as it can't determine what exists and what doesn't already? 




Reply all
Reply to author
Forward
0 new messages