Cisco: No error, but no Applying

39 views
Skip to first unread message

Nathan Brito

unread,
Aug 22, 2014, 3:10:13 PM8/22/14
to puppet...@googlegroups.com
I'm trying to apply settings on a Cisco Catalyst 2960S through the puppet, but I can not. 

When I give the "device #puppet verbose" command, the puppet does not return me error but does not apply the manifest. 


Follows the return of the command:

#puppet device --verbose
Info: starting applying configuration to switch.mydomain at telnet://admin:ad...@switch.mydomain
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for switch.mydomain
Info: Applying configuration version '1408732346'
Notice: Finished catalog run in 0.05 seconds


/etc/puppet/puppet.conf:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
#templatedir=$confdir/templates
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
dns_alt_names = puppetmaster,puppetmaster.mydomain

/etc/puppet/device.conf

[switch.mydomain]
type cisco
url telnet://admin:ad...@switch.mydomain

 
Manifest: /etc/puppet/manifests/switch.pp
 
interface {
      "GigabitEthernet0/1":
        description => "puppet test",
    }
}

PS: after that I see that nothing has changed on the switch

Nan Liu

unread,
Aug 22, 2014, 4:36:33 PM8/22/14
to puppet...@googlegroups.com
I think this needs to be under a node that matches your device.conf setting, so site.pp:

node switch.mydomain {
  interface { ...
  }

HTH,

Nan

Nathan Brito

unread,
Aug 25, 2014, 10:02:48 AM8/25/14
to puppet...@googlegroups.com
sorry, I posted missing content. 
I had already specified node. 
Follow the correct manifest: 

node switch.mydomain {
   interface {
      "GigabitEthernet1/0/1":
       description => "teste",
   }
}

yet the problem continues.

Em sexta-feira, 22 de agosto de 2014 17h36min33s UTC-3, Nan Liu escreveu:
On Fri, Aug 22, 2014 at 12:10 PM, Nathan Brito <natha...@gmail.com> wrote:
I'm trying to apply settings on a Cisco Catalyst 2960S through the puppet, but I can not. 

When I give the "device #puppet verbose" command, the puppet does not return me error but does not apply the manifest. 


Follows the return of the command:

#puppet device --verbose
Info: starting applying configuration to switch.mydomain at telnet://admin:admin@switch.mydomain

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for switch.mydomain
Info: Applying configuration version '1408732346'
Notice: Finished catalog run in 0.05 seconds


/etc/puppet/puppet.conf:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
#templatedir=$confdir/templates
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
dns_alt_names = puppetmaster,puppetmaster.mydomain

/etc/puppet/device.conf

[switch.mydomain]
type cisco
url telnet://admin:admin@switch.mydomain

 
Manifest: /etc/puppet/manifests/switch.pp
 
interface {
      "GigabitEthernet0/1":
        description => "puppet test",
    }
}

jcbollinger

unread,
Aug 25, 2014, 10:08:15 AM8/25/14
to puppet...@googlegroups.com


On Friday, August 22, 2014 3:36:33 PM UTC-5, Nan Liu wrote:
On Fri, Aug 22, 2014 at 12:10 PM, Nathan Brito <natha...@gmail.com> wrote:
I'm trying to apply settings on a Cisco Catalyst 2960S through the puppet, but I can not. 

When I give the "device #puppet verbose" command, the puppet does not return me error but does not apply the manifest. 


Follows the return of the command:

#puppet device --verbose
Info: starting applying configuration to switch.mydomain at telnet://admin:admin@switch.mydomain

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for switch.mydomain
Info: Applying configuration version '1408732346'
Notice: Finished catalog run in 0.05 seconds


/etc/puppet/puppet.conf:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
#templatedir=$confdir/templates
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
dns_alt_names = puppetmaster,puppetmaster.mydomain

/etc/puppet/device.conf

[switch.mydomain]
type cisco
url telnet://admin:admin@switch.mydomain

 
Manifest: /etc/puppet/manifests/switch.pp
 
interface {
      "GigabitEthernet0/1":
        description => "puppet test",
    }
}


I think this needs to be under a node that matches your device.conf setting, so site.pp:

node switch.mydomain {
  interface { ...
  }



Although there does need to be something that causes Puppet to associate the declarations in manifests/switch.pp with the node, that doesn't necessarily need to be a node block in site.pp.  Putting the declaration at top-level in site.pp should be enough.  Alternatively, if the master is recent enough to support directory environments, then turning on that feature would probably yield the desired behavior.

With that said, resource declarations -- such as for Interface['GigabitEthernet0/1'] -- normally should not be placed at top scope.  They should be in classes (in modules) or node blocks, instead.


John

Reply all
Reply to author
Forward
0 new messages