I have it working and I can run puppet device to send configuration to
device.
Now, I would like to configure the agent proxy so I don't have to
manually run puppet device to send configuration to devices, but to
puppet agent doing it for me in every run. Is this possible, how do I
have to do it?
I'm trying it with this manifest:
node default {
include cisco_ios::proxy
exec {'run puppet device':
command => '/opt/puppetlabs/bin/puppet device --verbose --logdest
syslog',
require => Class['cisco_ios::proxy'],
}
device_manager {'switch_cisco_pruebas':
type => 'cisco_ios',
credentials => {
address => '10.54.1.111',
port => '22',
username => 'test',
password => 'test123',
enable_password => '123test',
},
}
}
node switch_cisco_pruebas {
ntp_server { '1.2.3.5':
ensure => 'present',
key => 94,
prefer => true,
minpoll => 4,
maxpoll => 14,
}
ios_config { 'prueba_comandos':
command => "
default interface Gi1/0/2
int gi1/0/2
description Prueba Puppet
",
}
}
With this manifest, the "run puppet device" exec is done in every
puppet agent run, sending configuration to device, and works with
ntp_server and banner resources, but it doesn't work with ios_config
one, I get the error
Dec 5 14:23:55 leo10 puppet-agent[66368]: Could not retrieve catalog
from remote server: Error 500 on SERVER: Server Error: Evaluation Error:
Error while evaluating a Resource Statement, Could not autoload
puppet/type/ios_config: no such file to load -- puppet/resource_api
(file: /etc/puppetlabs/code/environments/production/manifests/site.pp,
line: 33, column: 2) on node switch_cisco_pruebas
The same manifest, applied with puppet device works without any problem.
What do I have to do to automatically configure device in every puppet run?
El 5/12/18 a las 12:11, Will Meek escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
puppet-users...@googlegroups.com
> <mailto:
puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-users/ef8056dd-83f3-4ed6-907b-42eec15cf9fc%40googlegroups.com
> <
https://groups.google.com/d/msgid/puppet-users/ef8056dd-83f3-4ed6-907b-42eec15cf9fc%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.