Re: [Puppet Users] Hiera lookup in hiera lookup

2021-05-18 Thread Erwin Bogaard
Indeed it was about looking up a value to use as part of a following 
lookup, so a lookup in a lookup.
I was already afraid this would not be possible.
Thanks for the suggestion of using separate yaml files, I'll explore that 
idea further.

On Tuesday, 18 May 2021 at 11:17:00 UTC+2 benri...@gmail.com wrote:

> Hi Erwin and Martin,
>
> I think there's a difference here - Erwin it seems you're trying to do 
> nested interpolation, while Martin it appears your example is for lookups 
> nested in hiera data.
>
> Erwin as far as I'm aware, nested interpolation in the manner you suggest 
> is not possible. At least I've not been able to get it to work, and I found 
> this engineering ticket a while back: 
> https://tickets.puppetlabs.com/plugins/servlet/mobile#issue/HI-532
>
> You can sometimes usually work around this by restructuring your hiera 
> data. In your example, perhaps you could have a prod.yaml and a test.yaml 
> file that each define their own env_hash, and then edit your hiera.yaml so 
> the node includes the correct file based on its environment (if you have 
> environment available as a fact) 
>
>
>
> On Tue, 18 May 2021, 6:38 pm Martin Alfke,  wrote:
>
>> Hi Erwin,
>>
>> Nested lookups are possible.
>>
>> We did a blog post on this topic:
>> https://blog.example42.com/2020/01/21/hiera-nested-lookups/
>>
>> Just be sure:
>>
>> A nested lookup (like in your example) always returns a string.
>> If you need arrays or hashes within a nested lookup you must use the 
>> alias function.
>>
>> hth,
>> Martin
>>
>> On 18. May 2021, at 10:23, Erwin Bogaard  wrote:
>>
>> Hi,
>>
>> I've been looking for this for a ling time, but can't find a definitive 
>> answer to my question: is it possible to use a lookup in a lookup?
>>
>> For example:
>> aaa::bbb: 
>> "mvn:com.xxx.bus/xxx-features/%{lookup('xxx::apps::env_hash.%{lookup('xxx::apps::env')}.yyy.version')}/xml/features"
>>
>> Should lead to the following string:
>> "mvn:com.xxx.bus/xxx-features/2.0.4/xml/features"
>>
>> If "xxx::apps::env" has the value 'test'.
>> And "xxx::apps::env_hash.test.yyy.version" has the value '2.0.4'.
>>
>> The idea is that I would like one variable, "xxx::apps::env", make it 
>> possible to switch in a hash from the 'test'-branch to the 'prod'-branch, 
>> for example. Where each branch in that hash contains certain specified 
>> different versions and/or other variables.
>>
>> Thanks!
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/5068271c-bac1-4beb-b097-91803dbf3e2en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/5068271c-bac1-4beb-b097-91803dbf3e2en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/BFCDA3D6-80FA-4BFA-8E94-475F62A3A362%40gmail.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/BFCDA3D6-80FA-4BFA-8E94-475F62A3A362%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/cce33618-d424-46ed-b633-aec0976663f3n%40googlegroups.com.


[Puppet Users] Hiera lookup in hiera lookup

2021-05-18 Thread Erwin Bogaard
Hi,

I've been looking for this for a ling time, but can't find a definitive 
answer to my question: is it possible to use a lookup in a lookup?

For example:
aaa::bbb: 
"mvn:com.xxx.bus/xxx-features/%{lookup('xxx::apps::env_hash.%{lookup('xxx::apps::env')}.yyy.version')}/xml/features"

Should lead to the following string:
"mvn:com.xxx.bus/xxx-features/2.0.4/xml/features"

If "xxx::apps::env" has the value 'test'.
And "xxx::apps::env_hash.test.yyy.version" has the value '2.0.4'.

The idea is that I would like one variable, "xxx::apps::env", make it 
possible to switch in a hash from the 'test'-branch to the 'prod'-branch, 
for example. Where each branch in that hash contains certain specified 
different versions and/or other variables.

Thanks!

-- 
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/5068271c-bac1-4beb-b097-91803dbf3e2en%40googlegroups.com.


Re: [Puppet Users] "puppetserver ca migrate" error

2021-03-04 Thread Erwin Bogaard
Hi Molly,

thanks for opening the ticket. No further info to add from my side.
I just executed the manual migration. To me it seems that way is actually 
easier than the puppetserver migrate-way, where yhou have to look for the 
location of your config file  ;-)

On Wednesday, 3 March 2021 at 22:39:08 UTC+1 Molly Waggett wrote:

> Hi Erwin,
>
> I have opened SERVER-2979 
> <https://tickets.puppetlabs.com/browse/SERVER-2979> to investigate your 
> issue. Any additional info you can add to that ticket would be greatly 
> appreciated.
>
> In the meantime, you can manually migrate your CA directory:
> 1. stop the puppetserver service:
> systemctl stop puppetserver
> 2. move your CA directory to the new location:
> mv /etc/puppetlabs/puppet/ssl/ca /etc/puppetlabs/puppetserver/ca
> 3. to maintain backwards compatibility, create a symlink from the new 
> location to the old location:
> ln -sf /etc/puppetlabs/puppetserver/ca /etc/puppetlabs/puppet/ssl/ca
> 4. restart the puppetserver service:
> systemctl start puppetserver 
>
> Let us know if you have any other issues.
>
> Thanks!
>
> On Fri, Feb 26, 2021 at 6:40 AM Erwin Bogaard  wrote:
>
>> Hi Molly,
>>
>> We don't really run an unusual setup: just a regular machine with 
>> hostname in local DNS available, no IPv6.
>> The installed Puppet component versions are as follows:
>> puppet-agent-7.4.1-1.el7.x86_64
>> puppet-client-tools-1.2.6-1.el7.x86_64
>> puppetdb-7.2.0-1.el7.noarch
>> puppetdb-termini-7.2.0-1.el7.noarch
>> puppet-release-1.0.0-15.el7.noarch
>> puppetserver-7.0.3-1.el7.noarch
>>
>> The requested configuration is as follows:
>> networking => {
>>   dhcp => "192.168.100.1",
>>   domain => "kntr.xxx.loc",
>>   fqdn => "puppet01.kntr.xxx.loc",
>>   hostname => "puppet01",
>> ...
>> }
>> os => {
>>   architecture => "x86_64",
>>   family => "RedHat",
>>   hardware => "x86_64",
>>   name => "CentOS",
>>   release => {
>> full => "7.9.2009",
>> major => "7",
>> minor => "9"
>>   },
>>   selinux => {
>> enabled => false
>>   }
>> }
>> ruby => {
>>   platform => "x86_64-linux",
>>   sitedir => "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.7.0",
>>   version => "2.7.2"
>> }
>> On Thursday, 25 February 2021 at 19:52:23 UTC+1 Molly Waggett wrote:
>>
>>> Hi Erwin,
>>>
>>> The puppetserver ca migrate command must be run while the puppetserver 
>>> service is stopped, but it looks like we're not catching the particular 
>>> connection error you're getting when we check to see whether the service is 
>>> running. 
>>>
>>> I'm wondering if you have an unusual networking setup, e.g. custom DNS 
>>> config, IPv6, etc.
>>> I was not able to reproduce your issue on a first attempt, so it would 
>>> also be helpful to know which version of puppetserver you're running, what 
>>> OS platform you're running on, and which version of Ruby you're using.
>>>
>>> Thanks!
>>>
>>> On Thu, Feb 25, 2021 at 2:59 AM Erwin Bogaard  
>>> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm trying to solve the notofocation about "The cadir is currently 
>>>> configured to be inside the /etc/puppetlabs/puppet/ssl directory".
>>>> When I follow the steps, and run:
>>>>
>>>> #  puppetserver ca migrate --config /etc/puppetlabs/puppet/puppet.conf
>>>>
>>>> I get the message: "Puppetserver service is running. Please stop it 
>>>> before attempting to run this command."
>>>>
>>>> If I then stop the puppetserver service and run the command again, I 
>>>> get the following Error: "Fatal error when running action 'migrate'
>>>>   Error: Failed connecting to https://xxx.loc:8140/status/v1/simple/ca
>>>>   Root cause: Failed to open TCP connection to xxx.loc:8140 (Invalid 
>>>> argument - connect(2) for "xxx.loc" port 8140)"
>>>>
>>>> That no connection is possible seems logical, as I stopped the service 
>>>> prevously.
>>>>
>>>> If "puppetsever ca migrate" won't run when the service is running, but 
>>>> it needs to connect to the

Re: [Puppet Users] "puppetserver ca migrate" error

2021-02-26 Thread Erwin Bogaard
Hi Molly,

We don't really run an unusual setup: just a regular machine with hostname 
in local DNS available, no IPv6.
The installed Puppet component versions are as follows:
puppet-agent-7.4.1-1.el7.x86_64
puppet-client-tools-1.2.6-1.el7.x86_64
puppetdb-7.2.0-1.el7.noarch
puppetdb-termini-7.2.0-1.el7.noarch
puppet-release-1.0.0-15.el7.noarch
puppetserver-7.0.3-1.el7.noarch

The requested configuration is as follows:
networking => {
  dhcp => "192.168.100.1",
  domain => "kntr.xxx.loc",
  fqdn => "puppet01.kntr.xxx.loc",
  hostname => "puppet01",
...
}
os => {
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "CentOS",
  release => {
full => "7.9.2009",
major => "7",
minor => "9"
  },
  selinux => {
enabled => false
  }
}
ruby => {
  platform => "x86_64-linux",
  sitedir => "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.7.0",
  version => "2.7.2"
}
On Thursday, 25 February 2021 at 19:52:23 UTC+1 Molly Waggett wrote:

> Hi Erwin,
>
> The puppetserver ca migrate command must be run while the puppetserver 
> service is stopped, but it looks like we're not catching the particular 
> connection error you're getting when we check to see whether the service is 
> running. 
>
> I'm wondering if you have an unusual networking setup, e.g. custom DNS 
> config, IPv6, etc.
> I was not able to reproduce your issue on a first attempt, so it would 
> also be helpful to know which version of puppetserver you're running, what 
> OS platform you're running on, and which version of Ruby you're using.
>
> Thanks!
>
> On Thu, Feb 25, 2021 at 2:59 AM Erwin Bogaard  wrote:
>
>>
>> Hi,
>>
>> I'm trying to solve the notofocation about "The cadir is currently 
>> configured to be inside the /etc/puppetlabs/puppet/ssl directory".
>> When I follow the steps, and run:
>>
>> #  puppetserver ca migrate --config /etc/puppetlabs/puppet/puppet.conf
>>
>> I get the message: "Puppetserver service is running. Please stop it 
>> before attempting to run this command."
>>
>> If I then stop the puppetserver service and run the command again, I get 
>> the following Error: "Fatal error when running action 'migrate'
>>   Error: Failed connecting to https://xxx.loc:8140/status/v1/simple/ca
>>   Root cause: Failed to open TCP connection to xxx.loc:8140 (Invalid 
>> argument - connect(2) for "xxx.loc" port 8140)"
>>
>> That no connection is possible seems logical, as I stopped the service 
>> prevously.
>>
>> If "puppetsever ca migrate" won't run when the service is running, but it 
>> needs to connect to the service, how is that ever going to work? I'm 
>> baffeled.
>>
>> As a work around: is there maybe a manual way to execute this migration?
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/c4627ffb-887d-490e-9dc6-7b730cdf3622n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/c4627ffb-887d-490e-9dc6-7b730cdf3622n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> *Molly Waggett*
> she/her
> Senior Software Engineer @ Puppet
>

-- 
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/d58e26d1-1cba-4b43-997d-819df7a8381an%40googlegroups.com.


[Puppet Users] "puppetserver ca migrate" error

2021-02-25 Thread Erwin Bogaard

Hi,

I'm trying to solve the notofocation about "The cadir is currently 
configured to be inside the /etc/puppetlabs/puppet/ssl directory".
When I follow the steps, and run:

#  puppetserver ca migrate --config /etc/puppetlabs/puppet/puppet.conf

I get the message: "Puppetserver service is running. Please stop it before 
attempting to run this command."

If I then stop the puppetserver service and run the command again, I get 
the following Error: "Fatal error when running action 'migrate'
  Error: Failed connecting to https://xxx.loc:8140/status/v1/simple/ca
  Root cause: Failed to open TCP connection to xxx.loc:8140 (Invalid 
argument - connect(2) for "xxx.loc" port 8140)"

That no connection is possible seems logical, as I stopped the service 
prevously.

If "puppetsever ca migrate" won't run when the service is running, but it 
needs to connect to the service, how is that ever going to work? I'm 
baffeled.

As a work around: is there maybe a manual way to execute this migration?

-- 
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/c4627ffb-887d-490e-9dc6-7b730cdf3622n%40googlegroups.com.


[Puppet Users] Re: epp conditionals not working, erb is

2015-11-04 Thread Erwin Bogaard
Aaron, thanks! That was the problem.
I think I misread (or didn't read) the paragraph "Accessing variables" in 
the documentation.
Thanks for helping me out with this.

On Wednesday, 4 November 2015 14:34:11 UTC+1, Aaron Russell wrote:
>
> I ran into this problem also. 
>
> Are you access the variable $xxx_yyy will full puppet path? IE 
> $classname::xxx_yyy
>
> If not you need to pass the variable into the template like this. 
>
> content => epp('module/template.epp',  { 'xxx_yyy' => "$xxx_yyy"}),
>
> Hope This helps
>  
>
> On Wednesday, November 4, 2015 at 8:24:59 AM UTC-5, Erwin Bogaard wrote:
>>
>> As epp is the way to go, I'm trying to create all my new templates in 
>> epp-format.
>> I have a problem with using conditionals, though.
>>
>> I have the following conditional in an epp template:
>> ...
>> <%- if $xxx_yyy == true { -%>
>> // code here
>> <%- } -%>
>> ...
>>
>> When I apply this template with a defined type resource that sets:
>> ...
>> xxx_yyy => true,
>> ...
>>
>> Nothing happens on that node.
>> Just to test what the value is of $xxx_yyy, I added "Value variable: <%= 
>> $xxx_yyy %>" to the templat, but that stays empty.
>>
>> I call the epp-template with:
>>
>> content => epp('module/template.epp'),
>>
>>
>> If I copy the template to template.erb and modify the code as needed:
>> ...
>> <%- if @sug_saml_enable -%>
>> // code here
>> <%- end -%>
>> ...
>>
>> All is working well when calling the template with:
>>
>> content => template('module/template.erb'),
>>
>>
>> What am I doing wrong?
>> Can someone point me in the right direction?
>>
>> This is with puppet-agent 4.2.3 and the newest puppetserver.
>>
>

-- 
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/81bdcddd-95f9-4cd0-9d2d-00bfb30b35f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] epp conditionals not working, erb is

2015-11-04 Thread Erwin Bogaard
As epp is the way to go, I'm trying to create all my new templates in 
epp-format.
I have a problem with using conditionals, though.

I have the following conditional in an epp template:
...
<%- if $xxx_yyy == true { -%>
// code here
<%- } -%>
...

When I apply this template with a defined type resource that sets:
...
xxx_yyy => true,
...

Nothing happens on that node.
Just to test what the value is of $xxx_yyy, I added "Value variable: <%= 
$xxx_yyy %>" to the templat, but that stays empty.

I call the epp-template with:

content => epp('module/template.epp'),


If I copy the template to template.erb and modify the code as needed:
...
<%- if @sug_saml_enable -%>
// code here
<%- end -%>
...

All is working well when calling the template with:

content => template('module/template.erb'),


What am I doing wrong?
Can someone point me in the right direction?

This is with puppet-agent 4.2.3 and the newest puppetserver.

-- 
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/cc95567f-f19b-460c-994f-14426214874c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to manage SugarCRM config.php with Puppet?

2014-01-24 Thread Erwin Bogaard
Thanks for your suggestions.
Hiera seemed the best solution, but it seems then you still have to manage 
the whole file. Not just parts.
When I have some more time, I'm going to dive in Hiera, as is seems to be a 
good solution to other 'challenges' I have (and have solved badly, right 
now).

For now, I'm going to investigate the pre_config_override.php-option. 
That's probably the best case for this situation.
And as this situation is quite unique, I don't necessarily have to find a 
general solution for this.

-- 
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/fad2e10b-38dd-4c76-858b-3f6c148937c3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] How to manage SugarCRM config.php with Puppet?

2014-01-21 Thread Erwin Bogaard
Sounds interesting. Checked it out, but it doesn't seem that SugarCRM's 
config.php supports xml.

-- 
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/a4d85f75-1cbd-4011-9feb-2ab8f35bd1cb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] How to manage SugarCRM config.php with Puppet?

2014-01-20 Thread Erwin Bogaard
Hi Pete,

thanks for your reply.
I thought I replied to you last night, but Google doesn't show it. So here 
it is again:

The difficulty with using a template, is that there are just too many 
exceptions between the instances. Some keys or arrays are exclusive to one 
or several, but not all, instances. Some values of keys are different, 
because a different version of a module is installed.
I can, as you suggest, partly overcome that by using inline templates, but 
that still just leaves too many other things to consider.

That's why Augeas (if I understand the principle behind that correctly), 
seemed the way to go. That way you can just add/remove/change configuration 
options, while leaving the rest of the config alone.
Problem is: it's only for key=value files.

Is there a workaround or maybe another solution to this?

Thanks


On Monday, January 20, 2014 1:06:08 AM UTC+1, Pete wrote:
>
> Hi
>
> On 20 Jan 2014, at 7:34 am, Erwin Bogaard > 
> wrote:
>
> Hi,
>
> I'm looking into a way to manage the SugarCRM config.php (see partial 
> example below this message). This proposes several problems:
> 1. The file is full of arrays and arrays-in-arrays (So I think Augeas is 
> useless, as far as I understand it)
> 2. Not all config.php's contain the same arrays and/or key-value 
> combinations. It's possible that in one config.php a certain arrays is 
> needed, while it isn't in another and that teh value of a certain key needs 
> to be different and is set from SugarCRM. So to summarize: I don't want to 
> manage every array and key/value in config.php. (So I think and 
> config.erb-template is out of the question)
>
>
> Using a template is the best way to manage it in my opinion.
> If your dataset is that complex you would need to manage it for each 
> individual node no matter which method you chose to utilise.
> Using hiera will make that simple.
>
> It’s not that tricky to generate entries in a template from an array.
> It’s also not that tricky to use an inline_template to generate a variable.
>
> 3. I could use exec with sed and for every array and key/value I need to 
> manage, but that would probably make it quite complex (if possible at all), 
> as I need to check for existance first, and depending on the outcome, add 
> the array or key/value or change the existing pair.
>
>
> This is the worst idea in my opinion. Please don’t go down that path. 
> Managing that by itself will be a nightmare.
>
> The way I used to do this was manage config_override.php, in which you can 
> specify arrays and key/values which override the ones in config.php, with 
> an erb template. Problem with that, is that when you change something in 
> the SugarCRM-interface, it 's added/changed in config_override.php. Which 
> is then regularly overwritten by Puppet, so the change is reverted.
>
> Does anyone have a good suggestion to manage this file reliably and with 
> reasonable complexity with Puppet?
>
> -
> Example file (partial):
>  $sugar_config = array (
>   'Reschedule' => 
>   array (
> 'version' => '2.0',
>   ),
>   'SAML_X509Cert' => '',
>   'SAML_loginurl' => '',
>   'addAjaxBannedModules' => 
>   array (
> 0 => 'AOS_Contracts',
> 1 => 'AOS_Invoices',
> 2 => 'AOS_Quotes',
> 3 => 'AOS_PDF_Templates',
> 4 => 'asol_Reports',
> 5 => 'Accounts',
> 6 => 'Contacts',
> 7 => 'Leads',
> 8 => 'Prospects',
>   ),
>   'admin_access_control' => false,
>   'admin_export_only' => false,
>   'aos' => 
>   array (
> 'version' => '5.3.2',
> 'contracts' => 
> array (
>   'renewalReminderPeriod' => '14',
> ),
> 'lineItems' => 
> array (
>   'totalTax' => false,
>   'enableGroups' => true,
> ),
> 'invoices' => 
> array (
>   'initialNumber' => '1',
> ),
> 'quotes' => 
> array (
>   'initialNumber' => '1',
> ),
>   ),
>   'authenticationClass' => '',
>   'cache_dir' => 'cache/',
>   'calculate_response_time' => true,
> ...
> ...
> );
>
> -- 
> 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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/e7c27236-f397-471e-b0ad-8e881e016a4b%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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/35c0287b-bcc0-4a1e-9ca7-bc975753da57%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] How to manage SugarCRM config.php with Puppet?

2014-01-19 Thread Erwin Bogaard
Hi,

I'm looking into a way to manage the SugarCRM config.php (see partial 
example below this message). This proposes several problems:
1. The file is full of arrays and arrays-in-arrays (So I think Augeas is 
useless, as far as I understand it)
2. Not all config.php's contain the same arrays and/or key-value 
combinations. It's possible that in one config.php a certain arrays is 
needed, while it isn't in another and that teh value of a certain key needs 
to be different and is set from SugarCRM. So to summarize: I don't want to 
manage every array and key/value in config.php. (So I think and 
config.erb-template is out of the question)
3. I could use exec with sed and for every array and key/value I need to 
manage, but that would probably make it quite complex (if possible at all), 
as I need to check for existance first, and depending on the outcome, add 
the array or key/value or change the existing pair.

The way I used to do this was manage config_override.php, in which you can 
specify arrays and key/values which override the ones in config.php, with 
an erb template. Problem with that, is that when you change something in 
the SugarCRM-interface, it 's added/changed in config_override.php. Which 
is then regularly overwritten by Puppet, so the change is reverted.

Does anyone have a good suggestion to manage this file reliably and with 
reasonable complexity with Puppet?

-
Example file (partial):
 
  array (
'version' => '2.0',
  ),
  'SAML_X509Cert' => '',
  'SAML_loginurl' => '',
  'addAjaxBannedModules' => 
  array (
0 => 'AOS_Contracts',
1 => 'AOS_Invoices',
2 => 'AOS_Quotes',
3 => 'AOS_PDF_Templates',
4 => 'asol_Reports',
5 => 'Accounts',
6 => 'Contacts',
7 => 'Leads',
8 => 'Prospects',
  ),
  'admin_access_control' => false,
  'admin_export_only' => false,
  'aos' => 
  array (
'version' => '5.3.2',
'contracts' => 
array (
  'renewalReminderPeriod' => '14',
),
'lineItems' => 
array (
  'totalTax' => false,
  'enableGroups' => true,
),
'invoices' => 
array (
  'initialNumber' => '1',
),
'quotes' => 
array (
  'initialNumber' => '1',
),
  ),
  'authenticationClass' => '',
  'cache_dir' => 'cache/',
  'calculate_response_time' => true,
...
...
);

-- 
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/e7c27236-f397-471e-b0ad-8e881e016a4b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Passing an array of user groups to a define

2012-11-09 Thread Erwin Bogaard
Hi Eric.
removing the quotes fixed it! If only all problems were that easy to fix ;-)
Thanks, Erwin

On Friday, November 9, 2012 9:26:11 PM UTC+1, Eric Sorenson wrote:
>
> Erwin, the variable is probably coming into the define correctly, but 
> you're quoting "$usergroups" in the user resource which will concatenate 
> the values together... remove the quotes and all should be well..
>
> On Friday, November 9, 2012 5:19:31 AM UTC-8, Erwin Bogaard wrote:
>>
>> As I try to get some flexibility in the creation of users, I switched to 
>> a define.
>> problem is, I can't pass an array of user groups anymore. This either 
>> results in
>> - wrong group creation: group1,group1group2,group2 (see that group1 and 
>> group2 are concatenated in the middle, undefined group)
>> - error: Group names must be provided as an array, not a comma-separated 
>> list.
>>
>>
>> I use the following define:
>>
>> define users::definitions (
>> $home   = "/home/$title",
>> $usergroups = $title,
>> $ifensure   = 'present',
>> ) {
>> user {
>> "$title":
>>   home   => "$home",
>>   managehome => true,
>>   ensure => "$ifensure",
>>   groups => "$usergroups",
>> }
>> ...
>> }
>>
>> And the following class to call the define:
>>
>> class users {
>> users::definitions {
>> 'rsnapshot':
>>   usergroups => [ 'group1', 'group2' ];
>> }
>> }
>>
>> Does anyone have an idea how to pass an array of groups to a define?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/K4nVjDO1l94J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Passing an array of user groups to a define

2012-11-09 Thread Erwin Bogaard
As I try to get some flexibility in the creation of users, I switched to a 
define.
problem is, I can't pass an array of user groups anymore. This either 
results in
- wrong group creation: group1,group1group2,group2 (see that group1 and 
group2 are concatenated in the middle, undefined group)
- error: Group names must be provided as an array, not a comma-separated 
list.


I use the following define:

define users::definitions (
$home   = "/home/$title",
$usergroups = $title,
$ifensure   = 'present',
) {
user {
"$title":
  home   => "$home",
  managehome => true,
  ensure => "$ifensure",
  groups => "$usergroups",
}
...
}

And the following class to call the define:

class users {
users::definitions {
'rsnapshot':
  usergroups => [ 'group1', 'group2' ];
}
}

Does anyone have an idea how to pass an array of groups to a define?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ahHYu4WJclkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Apply multiple defines in sequence

2012-11-05 Thread Erwin Bogaard
John and Tim, thanks for your replies and patience.
In the end, the solution of Tim seems to work great! That was what I was 
looking for: a relatively straight solution to a relatively straight 
problem (at least, that was what I thought to improve the previous 
situation).
As a novice to intermediate Puppet user, I've again learned a lot about 
writing some nice manifests and getting things done the way I want to.


On Thursday, November 1, 2012 3:27:10 PM UTC+1, Erwin Bogaard wrote:
>
> I'm having trouble getting the following scenario to work:
> - I have two defines, for example 'sugar' and 'wordpress'.
> - Some nodes need to have both applied, others only sugar.
> - Because you can't use the same resource twice (not that I want to), I 
> can't figure out how to apply two separate defines to one resource
>
> At  the moment I use the following workaround: I have two defines, one 
> with only sugar and one with both sugar and wordpress. As I have to change 
> both files if I change something for Sugar, this really isn't optimal.
> Anyone a suggestion?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/rrpE72obmHwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Apply multiple defines in sequence

2012-11-05 Thread Erwin Bogaard
After my previous post, I did some more thinking and reasearch. What do you 
think about:
- using an if/else-conditional. Would that work?
- using virtual resources? would that work?

On Monday, November 5, 2012 9:17:11 PM UTC+1, Erwin Bogaard wrote:
>
> As I'm in over my head, let's supply you with (part of) the manifests in 
> question:
>
> The define:
>
> define sugar::definitions_sug_wp (
>   $template   = 'sugar/etc/httpd/conf.d/sugar6x.conf.erb',
>   $client_domain  = "$title",
>   $mysql_rootpwd  = "$mysql_password",
>   $mysql_dbname,
>   $mysql_pwd,
>   $sugar_admin,
>   $sugar_pwd,
>
> ) {
>
> # This is for example to create the httpd.conf and the sugar-folder. So 
> this has to be in both. As you can see, I parametrized the httpd-conf, so I 
> can specify it in my class. Also, the  ${client_domain}-variable is used 
> throughout this define.
> file {
> "/etc/httpd/conf.d/sug-${client_domain}.conf":
>   content => template($template),
>   owner   => 'root',
>   group   => 'root',
>   mode=> '0644',
>   notify  => Service['httpd'];
> "/var/log/sugar/${client_domain}":
>   ensure  => 'directory';
>}
>
>
> # The following is specific to the WordPress-installation and doesn't need 
> to be applied to every machine. So this part isn't in the define 'define 
> sugar::definitions_sug'.
> file {
> # Configuratie van publieke html
> "/var/www/html/${client_domain}":
>   owner   => 'apache',
>   group   => 'apache',
>   mode=> '0744',
>   ensure  => 'directory';
> # Configuratiefile WordPress
> "/var/www/html/${client_domain}/wp-config.php":
>   owner   => 'apache',
>   group   => 'apache',
>   mode=> '0744',
>   require => File["/var/www/html/${client_domain}"],
>   content => template('sugar/wordpress/wp-config.php.erb');
>
> I call both defines ('sugar::definitions_sug_wp' and 'define 
> sugar::definitions_sug') in the following class:
> class sugar::instances {
>
> sugar::definitions_sug {
> # SugarCRM - ECM2
> 'node1':
>   mysql_dbname => 'dbname1',
>   mysql_pwd    => 'password1';
>
> sugar::definitions_sug_wp {
> 'node2':
>   sugar_admin  => 'text1',
>   sugar_pwd=> 'password2',
>   mysql_dbname => 'dbname2',
>   mysql_pwd=> 'password3';
>
> I include this class on one node to get several sugar-only vhosts and 
> several sugar+wordpress-nodes on that node.
>
> Hope this helps you explain things to me!
>
>
>
> On Monday, November 5, 2012 3:41:37 PM UTC+1, jcbollinger wrote:
>>
>>
>>
>> On Monday, November 5, 2012 3:48:58 AM UTC-6, Erwin Bogaard wrote:
>>>
>>> Thanks again for you reply, but it seems like you don't fully understand 
>>> what I'm having problems with. So I'll try to clarify it a little more:
>>> 1. The current way of using two defines is working flawlessly. So I (at 
>>> least partly) understand the concepts surrounding those.
>>> 2. Because I have two types of machines: some with just sugar and some 
>>> with sugar and wordpress, I now use two defines that overlap in part 
>>> (define1 contains all kinds of info about creating sugar db + unpacking 
>>> tar, etc, while define2 contains all the sugar info of define1 + stuff 
>>> about creating a wordpress db + unpacking wp tar, etc), this means editing 
>>> two files when I change something in the sugar define. As this can lead to 
>>> differing configurations because of editing errors (and always twice the 
>>> work), I would like to be able to split the defines up, so I can call 
>>> define1 (sugar) on all machines and define1 (sugar) and sefine 2 
>>> (wordpress) on the other machines.
>>> 3. Some of the variables are shared, for example the mysqld_pwd is used 
>>> twice, and I add a different suffix for sugar and wordpress to get two 
>>> databases. For the httpd-configuration, I specify a different template, 
>>> which is easy to to with defines. So all instances have unique resources, 
>>> hence the choice for defines, not classes.
>>>
>>> Does this help you help me?
>>>
>

[Puppet Users] Re: Apply multiple defines in sequence

2012-11-05 Thread Erwin Bogaard
As I'm in over my head, let's supply you with (part of) the manifests in 
question:

The define:

define sugar::definitions_sug_wp (
  $template   = 'sugar/etc/httpd/conf.d/sugar6x.conf.erb',
  $client_domain  = "$title",
  $mysql_rootpwd  = "$mysql_password",
  $mysql_dbname,
  $mysql_pwd,
  $sugar_admin,
  $sugar_pwd,

) {

# This is for example to create the httpd.conf and the sugar-folder. So 
this has to be in both. As you can see, I parametrized the httpd-conf, so I 
can specify it in my class. Also, the  ${client_domain}-variable is used 
throughout this define.
file {
"/etc/httpd/conf.d/sug-${client_domain}.conf":
  content => template($template),
  owner   => 'root',
  group   => 'root',
  mode=> '0644',
  notify  => Service['httpd'];
"/var/log/sugar/${client_domain}":
  ensure  => 'directory';
   }


# The following is specific to the WordPress-installation and doesn't need 
to be applied to every machine. So this part isn't in the define 'define 
sugar::definitions_sug'.
file {
# Configuratie van publieke html
"/var/www/html/${client_domain}":
  owner   => 'apache',
  group   => 'apache',
  mode=> '0744',
  ensure  => 'directory';
# Configuratiefile WordPress
"/var/www/html/${client_domain}/wp-config.php":
  owner   => 'apache',
  group   => 'apache',
  mode=> '0744',
  require => File["/var/www/html/${client_domain}"],
  content => template('sugar/wordpress/wp-config.php.erb');

I call both defines ('sugar::definitions_sug_wp' and 'define 
sugar::definitions_sug') in the following class:
class sugar::instances {

sugar::definitions_sug {
# SugarCRM - ECM2
'node1':
  mysql_dbname => 'dbname1',
  mysql_pwd=> 'password1';

sugar::definitions_sug_wp {
'node2':
  sugar_admin  => 'text1',
  sugar_pwd=> 'password2',
  mysql_dbname => 'dbname2',
  mysql_pwd=> 'password3';

I include this class on one node to get several sugar-only vhosts and 
several sugar+wordpress-nodes on that node.

Hope this helps you explain things to me!



On Monday, November 5, 2012 3:41:37 PM UTC+1, jcbollinger wrote:
>
>
>
> On Monday, November 5, 2012 3:48:58 AM UTC-6, Erwin Bogaard wrote:
>>
>> Thanks again for you reply, but it seems like you don't fully understand 
>> what I'm having problems with. So I'll try to clarify it a little more:
>> 1. The current way of using two defines is working flawlessly. So I (at 
>> least partly) understand the concepts surrounding those.
>> 2. Because I have two types of machines: some with just sugar and some 
>> with sugar and wordpress, I now use two defines that overlap in part 
>> (define1 contains all kinds of info about creating sugar db + unpacking 
>> tar, etc, while define2 contains all the sugar info of define1 + stuff 
>> about creating a wordpress db + unpacking wp tar, etc), this means editing 
>> two files when I change something in the sugar define. As this can lead to 
>> differing configurations because of editing errors (and always twice the 
>> work), I would like to be able to split the defines up, so I can call 
>> define1 (sugar) on all machines and define1 (sugar) and sefine 2 
>> (wordpress) on the other machines.
>> 3. Some of the variables are shared, for example the mysqld_pwd is used 
>> twice, and I add a different suffix for sugar and wordpress to get two 
>> databases. For the httpd-configuration, I specify a different template, 
>> which is easy to to with defines. So all instances have unique resources, 
>> hence the choice for defines, not classes.
>>
>> Does this help you help me?
>>
>
>
> No, not really.  You have been relatively clear about what you are trying 
> to accomplish, but I don't understand what is preventing you from 
> accomplishing it.  Perhaps that means you're stumbling over something that 
> seems trivial to me.  For example, if the real question is how to share 
> data between two or more defined types, then you have at least three 
> choices:
>
>1. Define the data in a class, and have each definition reference the 
>class variables instead of taking that data in the form of parameters.
>2. Externalize the data (e.g. into an Hiera data store), and have each 
>definition reference the needed values by the same fixed key

[Puppet Users] Re: Apply multiple defines in sequence

2012-11-05 Thread Erwin Bogaard
Thanks again for you reply, but it seems like you don't fully understand 
what I'm having problems with. So I'll try to clarify it a little more:
1. The current way of using two defines is working flawlessly. So I (at 
least partly) understand the concepts surrounding those.
2. Because I have two types of machines: some with just sugar and some with 
sugar and wordpress, I now use two defines that overlap in part (define1 
contains all kinds of info about creating sugar db + unpacking tar, etc, 
while define2 contains all the sugar info of define1 + stuff about creating 
a wordpress db + unpacking wp tar, etc), this means editing two files when 
I change something in the sugar define. As this can lead to differing 
configurations because of editing errors (and always twice the work), I 
would like to be able to split the defines up, so I can call define1 
(sugar) on all machines and define1 (sugar) and sefine 2 (wordpress) on the 
other machines.
3. Some of the variables are shared, for example the mysqld_pwd is used 
twice, and I add a different suffix for sugar and wordpress to get two 
databases. For the httpd-configuration, I specify a different template, 
which is easy to to with defines. So all instances have unique resources, 
hence the choice for defines, not classes.

Does this help you help me?



On Thursday, November 1, 2012 3:27:10 PM UTC+1, Erwin Bogaard wrote:
>
> I'm having trouble getting the following scenario to work:
> - I have two defines, for example 'sugar' and 'wordpress'.
> - Some nodes need to have both applied, others only sugar.
> - Because you can't use the same resource twice (not that I want to), I 
> can't figure out how to apply two separate defines to one resource
>
> At  the moment I use the following workaround: I have two defines, one 
> with only sugar and one with both sugar and wordpress. As I have to change 
> both files if I change something for Sugar, this really isn't optimal.
> Anyone a suggestion?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/rPV6a-6SduwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Apply multiple defines in sequence

2012-11-02 Thread Erwin Bogaard
Thanks for your reply. Let me clarify things a little more.
I use the following class to apply to a certain node:

class sugar::instances {

sugar::definitions_sugar {
# SugarCRM - ECM2
'node1':
  mysql_dbname => 'dbname1',
  mysql_pwd=> 'password1';

sugar::definitions_sugar_wp {
'node2':
  sugar_admin  => 'text1',
  sugar_pwd=> 'password2',
  mysql_dbname => 'dbname2',
  mysql_pwd=> 'password3';

As I wrote earlier: there are some nodes I like to apply just the 
sugar-defines to, and there are nodes that I like to apply the 
sugar-defines and the wordpress-defines to.
As you can see, some of the input (mysql_dbname/pwd) is the same for both 
defines. So I would really like to reuse this. As I don't understand how to 
apply multiple defines to one node, I use a workaround where I add the 
information for sugar to both defines. As this isn't really a good idea and 
creates extra work and a source for problems and inconsistency, I would 
really like to have one define for sugar and one for wordpress. In that 
situation I would like to apply only the sugar-define to node1 and both 
defines to node2, when only declaring node2 once.

I hope this makes things clearer, but as you said, maybe I'm using the 
wrong words (or jargon) for the right things.



On Friday, November 2, 2012 3:14:50 PM UTC+1, jcbollinger wrote:
>
>
>
> On Friday, November 2, 2012 7:14:14 AM UTC-5, Erwin Bogaard wrote:
>>
>> As there is no response, maybe some extra info:
>> For classes I use 'inherits' to apply multiple classes to one resource. 
>> For defines I can't find a similar technique. Is there one?
>>
>
>
> Perhaps there are no responses because your question is difficult to 
> understand.  I don't think you are using Puppet jargon in the conventional 
> way.
>
> In particular, you do not apply defines to resources, though you can apply 
> instances of defined types (which instances are resources) to nodes.  
> Likewise, you certainly do not apply classes to resources (though classes 
> can and normally do declare resources); rather, you apply classes to nodes.
>
> Furthermore, there is no general issue with applying multiple distinct 
> instances of the same or different defined types to any given node.  You 
> can, however, cause yourself trouble in that area with the way you write 
> the defines.  To help you troubleshoot such an issue we would need to see 
> some details of the definitions.
>  
> Finally, *do not use class inheritance to combine classes*.  Instead, use 
> the 'include' function, which is expressly for that purpose.  Be aware that 
> 'include' expresses a logical inclusion, not a textual one (i.e. it is *
> not* analogous to the C preprocessor's #include directive), therefore it 
> does not cause multiple definition of the named class.  Example:
>
> class mymodule::class1 {
>   # resource declarations ...
> }
>
> class mymodule::class2 {
>   include 'mymodule::class1'
>   # other resource declarations ...
> }
>
>
> John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/PDFvcbKGP7IJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Apply multiple defines in sequence

2012-11-02 Thread Erwin Bogaard
As there is no response, maybe some extra info:
For classes I use 'inherits' to apply multiple classes to one resource. For 
defines I can't find a similar technique. Is there one?

On Thursday, November 1, 2012 3:30:52 PM UTC+1, Erwin Bogaard wrote:
>
> In retrospect: a better subject would have been 'Apply multiple defines to 
> one resource'.
> But as far as I can see, there is no way to change a subject
>
> On Thursday, November 1, 2012 3:27:10 PM UTC+1, Erwin Bogaard wrote:
>>
>> I'm having trouble getting the following scenario to work:
>> - I have two defines, for example 'sugar' and 'wordpress'.
>> - Some nodes need to have both applied, others only sugar.
>> - Because you can't use the same resource twice (not that I want to), I 
>> can't figure out how to apply two separate defines to one resource
>>
>> At  the moment I use the following workaround: I have two defines, one 
>> with only sugar and one with both sugar and wordpress. As I have to change 
>> both files if I change something for Sugar, this really isn't optimal.
>> Anyone a suggestion?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/A_wiKntL4c0J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Apply multiple defines in sequence

2012-11-01 Thread Erwin Bogaard
In retrospect: a better subject would have been 'Apply multiple defines to 
one resource'.
But as far as I can see, there is no way to change a subject

On Thursday, November 1, 2012 3:27:10 PM UTC+1, Erwin Bogaard wrote:
>
> I'm having trouble getting the following scenario to work:
> - I have two defines, for example 'sugar' and 'wordpress'.
> - Some nodes need to have both applied, others only sugar.
> - Because you can't use the same resource twice (not that I want to), I 
> can't figure out how to apply two separate defines to one resource
>
> At  the moment I use the following workaround: I have two defines, one 
> with only sugar and one with both sugar and wordpress. As I have to change 
> both files if I change something for Sugar, this really isn't optimal.
> Anyone a suggestion?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/6qQy-b_5ImQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Apply multiple defines in sequence

2012-11-01 Thread Erwin Bogaard
I'm having trouble getting the following scenario to work:
- I have two defines, for example 'sugar' and 'wordpress'.
- Some nodes need to have both applied, others only sugar.
- Because you can't use the same resource twice (not that I want to), I 
can't figure out how to apply two separate defines to one resource

At  the moment I use the following workaround: I have two defines, one with 
only sugar and one with both sugar and wordpress. As I have to change both 
files if I change something for Sugar, this really isn't optimal.
Anyone a suggestion?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/t4NljM_Xm34J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.