[Puppet Users] Re: Duplicate declaration

2018-09-17 Thread Ugo Bellavance
To be honest, I used the !defined because I am not good enough with puppet right now to check the other options. I have made myself a note, though, to revisit this code eventually. Thanks, -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To

[Puppet Users] Re: Duplicate declaration

2018-09-11 Thread Ugo Bellavance
On Tuesday, September 11, 2018 at 9:31:43 AM UTC-4, jcbollinger wrote: > > > > On Monday, September 10, 2018 at 11:18:34 AM UTC-5, Michael Watters wrote: >> >> I'd prefer to see the entire vhost.pp code >> > Here it is: https://pastebin.com/1Qt9ng7b -- You received this message because you

[Puppet Users] Re: Duplicate declaration

2018-09-11 Thread jcbollinger
On Monday, September 10, 2018 at 11:18:34 AM UTC-5, Michael Watters wrote: > > I'd prefer to see the entire vhost.pp code but it looks like the issue is > the same as I mentioned previously, you have multiple atqapache::vhost > resources attempting to manage the client base directory. I've

[Puppet Users] Re: Duplicate declaration

2018-09-10 Thread Michael Watters
I'd prefer to see the entire vhost.pp code but it looks like the issue is the same as I mentioned previously, you have multiple atqapache::vhost resources attempting to manage the client base directory. I've ran into a similar issue with my own modules and was able to hack around it using the

[Puppet Users] Re: Duplicate declaration

2018-09-10 Thread Ugo Bellavance
On Monday, September 10, 2018 at 9:46:18 AM UTC-4, Michael Watters wrote: > > It sounds like your atqapache::vhost type is attempting to create > the /var/www/dev/user1/client1 directory for every vhost that is defined. > Can you post your definition for this type here? > > >> Wasn't it in my

[Puppet Users] Re: Duplicate declaration

2018-09-10 Thread Michael Watters
It sounds like your atqapache::vhost type is attempting to create the /var/www/dev/user1/client1 directory for every vhost that is defined. Can you post your definition for this type here? On Friday, September 7, 2018 at 5:05:44 PM UTC-4, Ugo Bellavance wrote: > > Hi, > > I have made a

Re: [Puppet Users] Re: Duplicate declaration error

2018-06-11 Thread jcbollinger
On Monday, June 11, 2018 at 2:43:25 AM UTC-5, Arnau wrote: > > Hi, > > "include" shouldn't be a problem: > > https://puppet.com/docs/puppet/5.3/lang_classes.html#include-like-behavior > > > the problematic declariation must be one of the resource like declaration. > You can only declare a

Re: [Puppet Users] Re: Duplicate declaration error

2018-06-11 Thread Arnau
Hi, "include" shouldn't be a problem: https://puppet.com/docs/puppet/5.3/lang_classes.html#include-like-behavior the problematic declariation must be one of the resource like declaration. You can only declare a class in such format once. define custom::apache::vhost () { include

[Puppet Users] Re: Duplicate declaration error

2018-06-10 Thread Clemens Bergmann
Hi, I found out that it does only break if I add one special vhost. The problematic vhost is defined as follows: class vhost::vhost3 { custom::apache::vhost{ #parameter } include ::apache::mod::proxy include ::apache::mod::proxy_http } If I remove the Includes everything works (but

[Puppet Users] Re: Duplicate declaration error

2018-06-09 Thread Clemens Bergmann
What confuses me is that I before switching to puppetlabs-apache I had a layout with a custom apache module as follows: class vhost::vhost1 { custom_apache::site{ #parameters } } define custom_apache::site (#parameters) { include custom_apache::ssl } class custom_apache::ssl

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

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

2017-11-23 Thread Peter Faller
On Thursday, 23 November 2017 16:47:44 UTC+2, buoyant_puppy wrote: > > Why does this: > class mymodule { > notify { "booboo": } > notify { "booboo": } > > provoke the error: > Error while evaluating a Resource Statement, Duplicate declaration: > Notify[booboo] is already declared

[Puppet Users] Re: Duplicate declaration - class is already declared

2015-09-14 Thread jcbollinger
On Friday, September 11, 2015 at 4:31:40 PM UTC-5, Julian Meier wrote: > > Hi all > > I’ve got three classes (example): > > ``` > class mymodule ( > $user = 'foobar', > ) {} > > class mymodule::classone ( > $foo = 'bar', > ) inherits ::mymodule::classone::params { > require

[Puppet Users] Re: Duplicate declaration with nested create_resources

2014-07-15 Thread jcbollinger
On Monday, July 14, 2014 8:08:51 AM UTC-5, Joao Morais wrote: Em sexta-feira, 11 de julho de 2014 11h11min17s UTC-3, jcbollinger escreveu: So, I'm interpreting the hiera data as providing configuration details that, if present, apply to every 'myservice', at least as defaults.

[Puppet Users] Re: Duplicate declaration with nested create_resources

2014-07-14 Thread Joao Morais
Em sexta-feira, 11 de julho de 2014 11h11min17s UTC-3, jcbollinger escreveu: So, I'm interpreting the hiera data as providing configuration details that, if present, apply to every 'myservice', at least as defaults. Furthermore, from the data and manifests I judge that

[Puppet Users] Re: Duplicate declaration with nested create_resources

2014-07-11 Thread jcbollinger
On Thursday, July 10, 2014 9:03:14 AM UTC-5, Joao Morais wrote: Hello list, I have some services that may be duplicated in some machines. They are much like an Apache vhost. In order to remove details from my manifests, I moved the service names to ENC because they are

[Puppet Users] Re: Duplicate declaration problem

2014-04-21 Thread Sean Korten
Found the problem. When passing an array to a define the default variable name for the elements of the array is $name. This works: define debugUsers { validate_string($name) notify { username: \${name}\: } } On Monday, April 21, 2014 11:31:52 AM UTC-6, Sean Korten wrote: So,

[Puppet Users] Re: Duplicate declaration

2013-11-27 Thread Raj kumar V
I read the JCBollingers advice and removed the Class[blah blah] stuff and it worked... On Wednesday, 27 November 2013 15:02:18 UTC+5:30, Raj kumar V wrote: I have module, for which if I add the class in the UI and run the agent with --test it fails with the following error. But If I just add

Re: [Puppet Users] Re: Duplicate declaration for files.

2013-10-15 Thread JuanBrein
Just my 2 cents... is better if you use stdlib - concat function for /etc/hosts... you can have a default section for all the hosts and a customized one for specific cases. You avoid conflicts as well. Cheers On Monday, October 14, 2013 4:28:39 PM UTC+1, mike wrote: Hello, I fix the problem

[Puppet Users] Re: Duplicate declaration for files.

2013-10-14 Thread Rahul Khengare
Hello Mike, Here the baseos file[/etc/hosts] resource get propagated to all the nodes because of inheritance. You again changing the same file in newnode.example.com again. Puppet does not allow to edit the same file twice (same resource again) in single run. Work around to that, Create a

[Puppet Users] Re: Duplicate declaration for files.

2013-10-14 Thread jcbollinger
On Friday, October 11, 2013 11:24:44 AM UTC-5, mike wrote: Hello, I'm configuring my linux server with puppet open and is ok. My question is the next; I've a declared in mi nodes.pp the next: [.] node 'basenode' { include 'baseos' include 'motd'

Re: [Puppet Users] Re: Duplicate declaration for files.

2013-10-14 Thread Miguel Angel Coa M.
Hello, I fix the problem with a case statement: [...] class baseos::rhel-hosts { case $fqdn { 'new-node.example.com': { file { /etc/hosts: ensure

Re: [Puppet Users] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)

2013-04-17 Thread Felix Frank
On 04/16/2013 05:39 PM, Rahul Khengare wrote: I am not able to change postgresql.conf file twice in postgresql module and then pg_statsinfo module in case of db01, it give duplication declaration of file resources. This is important: Puppet does not change your files. Puppet rewrites the file

[Puppet Users] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)

2013-04-16 Thread Rahul Khengare
thanks for reply, first let me again describe my problem in detail. I have two database server db01 and db02, on the database server (db01) i have to install and configure postgresql and pg_statinfo module and on database server(db02) i have to install and configure only postgresql. I created

[Puppet Users] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)

2013-04-12 Thread jcbollinger
On Thursday, April 11, 2013 1:11:16 PM UTC-5, Rahul Khengare wrote: Hi all, I am writing two modules abc and xyz. In both the modules i have to change common test.txt file,here i use template (.erb) file to changing the contents. In both abc and xyz the contents of test.txt file is

[Puppet Users] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)

2013-04-11 Thread llowder
On Thursday, April 11, 2013 1:11:16 PM UTC-5, Rahul Khengare wrote: Hi all, I am writing two modules abc and xyz. In both the modules i have to change common test.txt file,here i use template (.erb) file to changing the contents. In both abc and xyz the contents of test.txt file is

[Puppet Users] Re: Duplicate declaration for invoking a class

2012-12-14 Thread jcbollinger
What you have presented does not explain the problem. Though you do not recognize it, there is more to this than you are telling us. On Friday, December 14, 2012 3:44:51 AM UTC-6, A_SAAS wrote: Hi everyone, Here are the manifest I am using: In file '*modules/test/manifest/init.pp*':