I don't know what have I touch (if it's really my fault), but it's not
working again.
This is the manifest to configure the proxy agent:
node default {
include 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',
},
}
}
With banner resource it works:
amateo_adm@leo10:~$ sudo puppet device --verbose --target
switch_cisco_pruebas --resource banner --modulepath
/etc/puppetlabs/code/environments/ciscotest/modules
Info: retrieving resource: banner from switch_cisco_pruebas at
file:///etc/puppetlabs/puppet/devices/switch_cisco_pruebas.conf
banner { 'default':
motd => 'Test banner',
}
and I can configure it with this manifest:
banner {'default':
motd => 'Test banner',
}
and sudo puppet device --verbose --target switch_cisco_pruebas
--modulepath /etc/puppetlabs/code/environments/ciscotest/modules --apply
~/manifest.pp
but it didn't work with ntp_server resource:
amateo_adm@leo10:~$ sudo puppet device --verbose --target
switch_cisco_pruebas --modulepath
/etc/puppetlabs/code/environments/ciscotest/modules --resource ntp_server
Error: Could not autoload puppet/provider/ntp_server/ios: superclass
mismatch for class NtpServer
Error: Could not autoload puppet/type/ntp_server: Could not autoload
puppet/provider/ntp_server/ios: superclass mismatch for class NtpServer
Error: Could not autoload puppet/type/ntp_server: Could not autoload
puppet/provider/ntp_server/ios: superclass mismatch for class NtpServer
El 5/12/18 a las 8:33, Ángel L. Mateo escribió:
El 30/11/18 a las 15:16, Will Meek escribió:
Hi Angel,
I'm having a look at this now.
The manifest you supplied looks to be device_manager setup, which is
executed either by an agent (if set in an environment) or 'puppet
apply' rather than 'puppet device'.
This sets up the device.conf ready for puppet device.
You're right. That's the code I use to configure the device manager
(the proxy agent). I forgot to paste the code for the device. It's this:
# ~/manifest.pp
ntp_server { '1.2.3.5':
ensure => 'present',
key => 94,
prefer => true,
minpoll => 4,
maxpoll => 14,
}
I had to manually add modulepath to my apply commands:
root@leo10:/etc/puppetlabs/code/environments# puppet device --verbose
--target switch_cisco_pruebas --apply ~/manifest.pp --noop --modulepath
/etc/puppetlabs/code/environments/ciscotest/modules
Notice: Compiled catalog for switch_cisco_pruebas in environment
production in 0.07 seconds
Info: Applying configuration version '1543995151'
Notice: /Stage[main]/Main/Ntp_server[1.2.3.5]/ensure: current_value
'absent', should be 'present' (noop)
Info: Class[Main]: Unscheduling all events on Class[Main]
Info: Creating state file
/opt/puppetlabs/puppet/cache/devices/switch_cisco_pruebas/state/state.yaml
Notice: Applied catalog in 1.19 seconds
Can you tell me if you get any output for a 'resource' command eg.
# puppet device --verbose --target switch_cisco_pruebas --resource banner
Info: retrieving resource: banner from switch_cisco_pruebas at
file:///etc/puppetlabs/puppet/devices/switch_cisco_pruebas.conf
banner { 'default':
motd => 'Compliance banner',
}
amateo_adm@leo10:~$ sudo puppet device --verbose --target
switch_cisco_pruebas --resource banner
Info: retrieving resource: banner from switch_cisco_pruebas at
file:///etc/puppetlabs/puppet/devices/switch_cisco_pruebas.conf
banner { 'default':
I'm getting the configured banner:
motd =>
"\n+--------------------------------------------------------------+\n|
|\n| ATICA
UNIVERSIDAD DE MURCIA CATALYST 3650-12X|\n|
http://www.um.es PILOTO HIPERCONV|\n|
|\n|
------------------------------ |\n|
|\n| ATENCION: Esta intentando
conectar con un conmutador privado |\
...
Also - could you verify that the resource_api gem is installed?
eg.
# gem list | grep resource_api
puppet-resource_api(1.6.2)
It's installed in the puppet's ruby environment, but not in
_standard's_:
amateo_adm@leo10:~$ gem list | grep resource_api
amateo_adm@leo10:~$ sudo /opt/puppetlabs/puppet/bin/gem list | grep
resource_api
puppet-resource_api (1.6.2, 1.6.1, 1.6.0)
--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/20049ea1-83c1-f809-b0b3-031efcd1af07%40um.es.
For more options, visit https://groups.google.com/d/optout.