Re: [Puppet Users] exec: creates overrides onlyif?
On Tue, Feb 15, 2011 at 14:39, Matthew Pounsett wrote: > On 2011/02/14, at 12:21, Daniel Pittman wrote: > >> I think this discussion totally deserves a feature/bug report in redmine, >> because both positions are reasonable. They do point to a hole where our >> specifation seems vague, and where we *should* have made a decision: right >> now we have a real chance of changing whatever the behaviour is by accident. >> >> Matthew, do you want to file this at https://projects.puppetlabs.com for us, >> along with the why behind your desire? > > Will do. > > I'm actually mostly just concerned with having the relationship between the > two directives clarified. Right now the docs don't say anything about how > they interact. As Felix Frank wrote, I can work around the case where > 'creates' ignores 'onlyif' by moving that test into my 'onlyif' directive. Honestly, that is the thing I actually care about too. I want to make sure we do specify it, and document that, so that we don't mess it up. The only thing I like less than unspecified behaviour is changing unspecified behaviour by accident. :) I don't know which way the design decision will go, and suspect that the "work around" will be the only blessed outcome with giving both being an actual error, but we will see... Thanks for filing that. It makes sure we don't lose track of this stuff. Daniel =-- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Re: [Puppet Users] exec: creates overrides onlyif?
On 2011/02/14, at 12:21, Daniel Pittman wrote: > Hey. > > I think this discussion totally deserves a feature/bug report in redmine, > because both positions are reasonable. They do point to a hole where our > specifation seems vague, and where we *should* have made a decision: right > now we have a real chance of changing whatever the behaviour is by accident. > > Matthew, do you want to file this at https://projects.puppetlabs.com for us, > along with the why behind your desire? Will do. I'm actually mostly just concerned with having the relationship between the two directives clarified. Right now the docs don't say anything about how they interact. As Felix Frank wrote, I can work around the case where 'creates' ignores 'onlyif' by moving that test into my 'onlyif' directive. thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Re: [Puppet Users] exec: creates overrides onlyif?
Hey. I think this discussion totally deserves a feature/bug report in redmine, because both positions are reasonable. They do point to a hole where our specifation seems vague, and where we *should* have made a decision: right now we have a real chance of changing whatever the behaviour is by accident. Matthew, do you want to file this at https://projects.puppetlabs.com for us, along with the why behind your desire? Regards, Daniel -- Puppet Labs Developer –http://puppetlabs.com Daniel Pittman Contact me via gtalk, email, or phone: +1 (877) 575-9775 Sent from a mobile device. Please forgive me if this is briefer than usual. On Feb 14, 2011 9:16 AM, "Felix Frank" wrote: > On 02/14/2011 05:27 PM, Matthew Pounsett wrote: >> >> On 2011/02/14, at 11:12, Felix Frank wrote: >> >>> On 02/10/2011 08:47 PM, Matthew Pounsett wrote: The docs are vague on how the two interact.. but it seems to me that 'creates' will override 'onlyif' in an exec clause. i.e. if the file named by 'creates' exists, then 'onlyif' is ignored. Is someone able to confirm that? >>> >>> I cannot positively confirm, but the opposite wouldn't make a bit of >>> sense to me. >> >> Sometimes files exist already but need to be updated. With 'creates' and 'onlyif' both set, I'd expect an OR behaviour: write the file if the file referenced by 'creates' doesn't exist, OR if 'onlyif' evaluates to true. > > I wouldn't expect that, as that's what an imaginary "alwaysif" would do. > > But that's possibly just me ;-) > > If in doubt, get rid of the create and include a "test -e" in your > onlyif statement. > > Cheers, > Felix > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > 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. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Re: [Puppet Users] exec: creates overrides onlyif?
On 02/14/2011 05:27 PM, Matthew Pounsett wrote: > > On 2011/02/14, at 11:12, Felix Frank wrote: > >> On 02/10/2011 08:47 PM, Matthew Pounsett wrote: >>> >>> The docs are vague on how the two interact.. but it seems to me that >>> 'creates' will override 'onlyif' in an exec clause. i.e. if the file named >>> by 'creates' exists, then 'onlyif' is ignored. Is someone able to confirm >>> that? >> >> I cannot positively confirm, but the opposite wouldn't make a bit of >> sense to me. > > Sometimes files exist already but need to be updated. With 'creates' and > 'onlyif' both set, I'd expect an OR behaviour: write the file if the file > referenced by 'creates' doesn't exist, OR if 'onlyif' evaluates to true. I wouldn't expect that, as that's what an imaginary "alwaysif" would do. But that's possibly just me ;-) If in doubt, get rid of the create and include a "test -e" in your onlyif statement. Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Re: [Puppet Users] exec: creates overrides onlyif?
On 2011/02/14, at 11:12, Felix Frank wrote: > On 02/10/2011 08:47 PM, Matthew Pounsett wrote: >> >> The docs are vague on how the two interact.. but it seems to me that >> 'creates' will override 'onlyif' in an exec clause. i.e. if the file named >> by 'creates' exists, then 'onlyif' is ignored. Is someone able to confirm >> that? > > I cannot positively confirm, but the opposite wouldn't make a bit of > sense to me. Sometimes files exist already but need to be updated. With 'creates' and 'onlyif' both set, I'd expect an OR behaviour: write the file if the file referenced by 'creates' doesn't exist, OR if 'onlyif' evaluates to true. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.
Re: [Puppet Users] exec: creates overrides onlyif?
On 02/10/2011 08:47 PM, Matthew Pounsett wrote: > > The docs are vague on how the two interact.. but it seems to me that > 'creates' will override 'onlyif' in an exec clause. i.e. if the file named > by 'creates' exists, then 'onlyif' is ignored. Is someone able to confirm > that? I cannot positively confirm, but the opposite wouldn't make a bit of sense to me. Both are conditions that are meant to keep the exec from running if it's not necessary. Now if onlyif were named "dowhenever" or somesuch, that would be a different story... Regards, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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] exec: creates overrides onlyif?
The docs are vague on how the two interact.. but it seems to me that 'creates' will override 'onlyif' in an exec clause. i.e. if the file named by 'creates' exists, then 'onlyif' is ignored. Is someone able to confirm that? Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.