[Puppet Users] Re: templates and virtual resources query

2017-11-24 Thread desert kun
Hi Jason! Came into exactly this issue. I know 3 years have passed, but have you solved the issue the way you intended to? On Friday, August 8, 2014 at 9:03:21 AM UTC+3, Jason Ball wrote: > > Hi all, > > I have a user collection via a custom virtual resource, this allows me to > realize users

Re: [Puppet Users] How can this become smarter (shorter) ?

2017-11-24 Thread Henrik Lindberg
On 24/11/17 16:09, mattf...@gmail.com wrote: Hi, this looks like lots of code and could be more efficient (Zesty & Xenial )? You have quite a lot of repetition - you can fix that by using a default section for your resources. It is a bit of work to find all repeated settings so I am only

[Puppet Users] How can this become smarter (shorter) ?

2017-11-24 Thread mattfe78
Hi, this looks like lots of code and could be more efficient (Zesty & Xenial )? Thanks for your support ! $mirrors = { 'xenial_main' => { location => 'http://de.archive.ubuntu.com/ubuntu', release => 'xenial', repos =>

Re: [Puppet Users] Duplicate declaration error - what's the correct approach to avoid this?

2017-11-24 Thread Dirk Heinrichs
Am 23.11.2017 um 15:47 schrieb buoyant_puppy: > That's is a simplified version of my actual use case: >   $mythings.each | String $x | {    # for each x in list 'mythings' >     notify { "gonna do something with $x": } >   Not sure, but I think you need to use ${x} in the resource

Re: [Puppet Users] Re: Duplicate declaration error - what's the correct approach to avoid this?

2017-11-24 Thread Dirk Heinrichs
Am 24.11.2017 um 10:14 schrieb buoyant_puppy: > Code: >   $dns[resolvers].each | String $resolver | { >     file_line { 'adding ns $resolver': path => '/etc/resolv.conf', > line => 'nameserver $resolver', } >     notify { "just added $resolver to /etc/resolv.conf": } >   } There are a few errors

[Puppet Users] Re: Duplicate declaration error - what's the correct approach to avoid this?

2017-11-24 Thread buoyant_puppy
On Thursday, November 23, 2017 at 5:20:54 PM UTC+1, Peter Faller wrote: > > > The error occurs because you have two resources of the same type (notify) > with the same name ('booboo'). Remember that 'notify' is not like a ' > log.info' - it is a resource in it's own right, and each 'notify' has