On Tuesday, November 5, 2013 9:11:38 AM UTC-6, Martin Langhoff wrote:
>
> Hi Puppeteers, 
>
> When you have complex/rich classes, and large numbers of machines/VMs, 
> sometimes there is a machine that needs a temporary override on a 
> file. 
>
> Is there a way to say something like... ? 
>
>   node 'fqdn' { # I work for RL :-) 
>       include rl_users 
>       include rl_base 
>       include rl_webserver # defines /etc/httpd/conf.d/foo.conf 
>       ignore File['/etc/httpd/conf.d/foo.conf'] 
>   } 
>
> or something conceptually equivalent? 
>
> I know of a couple inelegant options: I can disable puppet on that VM 
> for the duration, or comment out the relevant class. 
>
> A more precise override/ignore is of course better, as other 
> components of the configuration are still applied correctly. 
>
>

You could consider just shutting down or deactivating the puppet agent on 
the affected machine for the duration of the override.  For example, run

puppet agent --disable

there and afterward run

puppet agent --enable

.  If that's not viable, then something close to the idea you proposed 
should be possible:

node 'fqdn' { # I work for RL :-) 
  include rl_users 
  include rl_base 
  include rl_webserver
  File<| title == '/etc/httpd/conf.d/foo.conf' |> {
    ensure => 'present',
    content => undef
    # override other properties to undef (no quotes)
    # as needed.
  }
}


John

-- 
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/51512008-1240-4fe1-af23-0938f4e7c0ff%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to