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/d6eeff7b-dadc-c86c-1cd4-36f59f5fb2e7%40um.es.
For more options, visit https://groups.google.com/d/optout.

Reply via email to