On 1/6/14 9:28 AM, bruce bushby wrote:
> Hello 
> 
> I have a issue with duplicate Augeas settings and hoping to bounce the
> issue off the community for some ideas.
> 
> I like to "pre-deploy" my servers regardless of what application they
> will run and I typically have them sitting in
> (/etc/puppet/manifest/classes/xxxx-linux-server) where they remain until
> they are moved into an "application class" ....which then adds
> additional modules 
> 
> My "base" setup does not allow ip_forwarding:
> [root@puppetdev-stc development]# grep net.ipv4.ip_forward
> defaults/manifests/config.pp
> sysctl { 'net.ipv4.ip_forward': value => '0', comment => 'this is a
> comment' }
> [root@puppetdev-stc development]# 
> 
> However, I have an application that does require ip_forwarding .....and
> when I add the "application layer" ....I get a conflict:
> 
> Error: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Duplicate declaration: Sysctl[net.ipv4.ip_forward] is already
> declared in file
> /etc/puppet/modules/development/defaults/manifests/config.pp:4; cannot
> redeclare at
> /etc/puppet/modules/development/wombat/manifests/config.pp:5 on node
> puppet-client.xxxx.xxx.xx
> 
> 
> How can I force puppet to simply execute the sysctl settings in order (I
> use requires to control module order) ...meaning the last setting will
> become the valid setting?
> 
> 
> Thanks
> Bruce

Hi Bruce,

Recommend that you move the data from your current pattern of defaults
and application names into Hiera. You can then use your application name
as a hierarchy level in Hiera to supply different data based on the
application name.

Your method of getting into a pre-deploy state and then moving into a
deploy state is also potentially dangerous. If you manage any resources
in the pre-deploy state that are not in the deploy state, then you
cannot simply run Puppet with the deploy level code to reach the end
system state that you desire. Ideally you would classify the node and
get it into one state instead of your method of getting it into one
state and then into another through the use of different code paths and
data in Puppet.

BR,
-g

-- 
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/52CC58D9.6050507%40garretthoneycutt.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to