Feature #651
Exec checks should be turned into metaparameters
| Status: | Accepted | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | RAL | |||
| Target version: | 3.X | |||
| Affected Puppet version: | 0.24.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 19 |
Description
The ‘checks’ in Exec — refreshonly, onlyif and unless — should be changed into metaparameters, so they’re available for all resource types.
My guess is that this will require defining a new type of metaparameter, in the same way that the Exec checks are a slightly different type of parameter.
Related issues
History
Updated by Luke Kanies almost 5 years ago
I think that we should just move all of the exec checks (unless, onlyif, and possibly creates) to work on all types, rather than just exec.
Updated by Redmine Admin almost 4 years ago
- Status changed from 1 to Needs Decision
Updated by Luke Kanies over 3 years ago
- Subject changed from Service should support "unless" to Exec checks should be turned into metaparameters
- Status changed from Needs Decision to Accepted
- Assignee changed from Luke Kanies to Puppet Community
- Affected Puppet version set to 0.24.4
Updated by Luke Kanies over 3 years ago
- Status changed from Accepted to Duplicate
Duplicate of #651.
Updated by Luke Kanies over 3 years ago
- Status changed from Duplicate to Accepted
This wasn’t supposed to be marked a duplicate — the others were.
Updated by Jeff Goldschrafe over 3 years ago
I’m chiming in to note that the new Augeas type in 0.24.7 has an onlyif parameter that functions differently from exec’s, and that may block this.
Updated by Luke Kanies over 3 years ago
- Target version changed from 0.25.0 to 4
Updated by James Turnbull almost 3 years ago
- Assignee deleted (
Puppet Community)
Updated by Klavs Klavsen almost 3 years ago
Me too :)
Just opened ticket #2417 – and this ticket would def. solve that tickets problem.
Currently I made a fact $tmpdevice, which greps for the existence of a /tmp mountpoint in /etc/fstab – and wrap the mount in an if $tmpdevice.
Updated by Luke Kanies over 2 years ago
- Target version changed from 4 to 2.6.0
Updated by Roy Nielsen over 2 years ago
So far I have made a basic change to add an :unless metaparameter — it doesn’t have all the checks that exec has, but it semi-functions. The problem is that it currently exits the puppet run with an error if the condition is met.
I’m having trouble figuring out how to use the transaction class to “skip” a resource if the condition is met rather than exit the run entirely.
Code: http://github.com/amrset/puppet/blob/master/lib/puppet/type.rb
Regards, -Roy
Updated by James Turnbull over 2 years ago
- Target version changed from 2.6.0 to 2.7.x
Updated by Nigel Kersten over 1 year ago
- Assignee set to Nigel Kersten
Roy, I’m really sorry we let this languish so long. Is that code still valid?
Updated by Corey Osman about 1 year ago
Any updates on this? I would also like to have onlyif available to all types. See my post regarding onlyif for ssh_authorized_key type.
http://groups.google.com/group/puppet-users/browse_thread/thread/880199dc6292f8dd
Updated by Nigel Kersten about 1 year ago
- Assignee deleted (
Nigel Kersten) - Target version changed from 2.7.x to 3.X
Yep. We’ve had a couple of half-done attempts to provide this, but it’s not as trivial as it sounds.