[Puppet Users] Re: Need to put iterative value in a file

2017-05-05 Thread James Perry
Have you looked into the sshkey type already built into Puppet at https://docs.puppet.com/puppet/4.10/types/sshkey.html? Another option or possible combination would be to look at file_line function in Puppet's stdlib package. Using

[Puppet Users] Have Puppet remove a user when the associated class which created it is removed

2017-05-05 Thread James Perry
As I keep tweaking our Puppet/Foreman setup, I was wondering if it was somehow possible to auto-magically remove uses when the associated class is removed from the server. All of our Puppet code is under source code management and requires a full change approval process to implement. I though

[Puppet Users] Re: Need to put iterative value in a file

2017-05-05 Thread John Gelnaw
The two ways I can think of, you can use ssh_authorized_key as part of a defined type, or you can create a file resource with a template, and use iteration within the template. Iteration within the template requires "future parser" or Puppet 4.x. -- You received this message because you are su

[Puppet Users] PuppetDB / hiera and Sensitive() questions

2017-05-05 Thread Denny Fuchs
Hello, - Puppet: node: 3.7.2-4 / puppet server: 2.7.2-1puppetlabs1 / puppetdb: 4.4.0-1puppetlabs1 - Distribution: Debian Jessie - Module version: latest I have some questions about the Sensitive() function: I've *rewritten* my config to something like this: class profile::grafan

Re: [EXTERNAL] - [Puppet Users] Need to put iterative value in a file

2017-05-05 Thread Dirk Heinrichs
On 04.05.2017 09:26, Quentin lenglet wrote: > $demofiles = "/root/.ssh/test" > $lpsc::ssh_keys.each | String $value | { > file {$demofiles: This will not work, since the loop potentially creates multiple file resources with the same name ("/root/.ssh/test"), which is no

Re: [Puppet Users] Need to put iterative value in a file

2017-05-05 Thread Henrik Lindberg
On 04/05/17 09:26, Quentin lenglet wrote: Ho everyone, I have a lot of difficulty on Puppet for writing my own module and I don't succeed to understand how the module are made on Internet. I need to develop a custom module for put ssh keys into the right file. My ideas is to put an array with th

Re: [Puppet Users] Re: Upgrading to Puppet 4 - what about the modules

2017-05-05 Thread Henrik Lindberg
On 04/05/17 08:35, mobios wrote: > As i updated to puppet 4 i had to modify my modules to be puppet 4 > ready. > > >For example: > >All custom defines need to be in there own manifest and cant be > included in other manifests. > While being a recommendation that is not true in gen