[Puppet Users] Re: Patterns for building configs using hashes & arrays

2014-05-26 Thread Jesse Cotton
I like this approach too :) I am just wondering how you build the hash or array up since variables are immutable and cannot be reassigned. For example, I want to do the below however I can't. define duplicity::job( $directories= [], $gpg_key_id = undef, $print_stats

[Puppet Users] Patterns for building configs using hashes & arrays

2014-05-25 Thread Jesse Cotton
I am new to puppet and decided to really get my feet wet by writing a duplicity module (https://github.com/JCotton1123/puppet-duplicity.git). I am struggling to deal with the fact that variables are immutable and cannot be reassigned (within the same scope). This has become a real issue while t

[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-21 Thread Jesse Cotton
only applies to nodes that have a particular role or profile. Your first suggestion is good although thats not how we're currently assigning classes. On Wednesday, May 21, 2014 10:03:33 AM UTC-4, jcbollinger wrote: > > > > On Tuesday, May 20, 2014 12:54:15 PM UTC-5, Jesse Cotton

[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-20 Thread Jesse Cotton
> > >>> We're aware of most of this and agree with most of this. However when >> you always call include, you lose the ability to say a particular hiera >> variable is attached to the profile. For example >> >> If you define: >> >> class profile::apache_phpfpm { >> include ::apache >> } >> >>

[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-19 Thread Jesse Cotton
Perhaps I am overlooking something. How would you construct the hierarchy so you could set apache::keepalive for this profile? class profile::apache_phpfpm { include ::apache } You could do global variables, but you couldn't one set the hierarchy to > the profile level? Thus you isolate vari

[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-19 Thread Jesse Cotton
On Monday, May 19, 2014 10:18:11 AM UTC-4, jcbollinger wrote: > > > > On Friday, May 16, 2014 10:55:35 AM UTC-5, Jesse Cotton wrote: >> >> I work with Matt and am filling in for him since I posed this question to >> him originally. >> >> Our confusion

[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-17 Thread Jesse Cotton
cissor in php specific configurations (or > alternatively creative erb ruby code to other configurations). This is > what I do for a nginx + php-fm configuration. > > class profile::webserver { class { "nginx": } -> class { "php": } } > > > On Friday, May 16, 2014 8

[Puppet Users] Re: Craig Dunn's Roles/Profiles/Components & Conflicts

2014-05-16 Thread Jesse Cotton
I work with Matt and am filling in for him since I posed this question to him originally. Our confusion really lies around how you layout profiles for a multi-function box. For example, suppose you have a role, "CMS App Server" that will host various CMS like Wordpress, Drupal, and others. They