Auto*

57 views
Skip to first unread message

Trevor Vaughan

unread,
Sep 23, 2014, 2:47:39 PM9/23/14
to puppe...@googlegroups.com
Sitting here at PuppetConf and I just added a PR for the ability to use autorequire, autobefore, autonotify, and autosubscribe to custom/native types.


It worked during my testing, but anyone that's willing to externally verify would be most appreciated.

Thanks, and hope everyone is having a good conference!

Trevor

--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvau...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

Trevor Vaughan

unread,
Sep 23, 2014, 2:49:14 PM9/23/14
to puppe...@googlegroups.com
Apologies, the link to the code in GitHub is at https://github.com/onyxpoint/puppet/tree/PUP-3331.

Thanks,

Trevor

Felix Frank

unread,
Sep 23, 2014, 3:03:55 PM9/23/14
to puppe...@googlegroups.com
On 09/23/2014 08:47 PM, Trevor Vaughan wrote:
> Sitting here at PuppetConf and I just added a PR for the ability to
> use autorequire, autobefore, autonotify, and autosubscribe to
> custom/native types.
>
> https://tickets.puppetlabs.com/browse/PUP-3331
>
> It worked during my testing, but anyone that's willing to externally
> verify would be most appreciated.
>
> Thanks, and hope everyone is having a good conference!
>
> Trevor

Autonotify...?

I like your way of thinking big and building good things but...this
makes me shudder a bit.

Are you sure we want that? Are you sure *you* do? ;-)

Cheers,
Felix

David Schmitt

unread,
Sep 23, 2014, 3:20:01 PM9/23/14
to puppe...@googlegroups.com
"We only supply the guns, people kill people."



Regards, David
--
* Always looking for people I can help with awesome projects *
G+: https://plus.google.com/+DavidSchmitt
Blog: http://club.black.co.at/log/
LinkedIn: http://at.linkedin.com/in/davidschmitt

Trevor Vaughan

unread,
Sep 23, 2014, 4:08:41 PM9/23/14
to puppe...@googlegroups.com
Yup, I'm 100% sure that I want it.

Though it should be used with care, it can be quite useful when you have a set of custom types that you've built yourself and need them to work in sane ways.

More importantly, when I want to notify a service *but it might not exist*, I need autonotify because the Puppet DSL doesn't allow me to not care if a resource exists.

Trevor



--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/5421C7D6.8090201%40dasz.at.

For more options, visit https://groups.google.com/d/optout.

Felix Frank

unread,
Sep 23, 2014, 4:09:07 PM9/23/14
to puppe...@googlegroups.com
On 09/23/2014 09:19 PM, David Schmitt wrote:

Are you sure we want that? Are you sure *you* do? ;-)

"We only supply the guns, people kill people."

Felix Frank

unread,
Sep 23, 2014, 4:14:46 PM9/23/14
to puppe...@googlegroups.com
On 09/23/2014 10:08 PM, Trevor Vaughan wrote:
> More importantly, when I want to notify a service *but it might not
> exist*, I need autonotify because the Puppet DSL doesn't allow me to
> not care if a resource exists.

Hey Trevor,

are you trying to goad me into speaking out for the defined() function?
I'm not falling for that :)

I can see the pain point (although I cannot say I feel the pain, really).

It would be neat if this would come with a batch of matching
metaparameters, so that I can set 'autonotify => false' if I'm chicken.
This should perhaps even be the default. Thoughts?

Best,
Felix

Trevor Vaughan

unread,
Sep 23, 2014, 4:23:59 PM9/23/14
to puppe...@googlegroups.com
Ah, well the way this is set up is that it only affects defined types.

So:

autorequires(:file) do
  ['foo','bar']
end

autonotify(:exec) do
  ['fancy_stuff']
end

However, if you're writing defined types, you're probably adept enough to not shoot yourself in the face (hopefully). In this case, it's VERY clear what you're doing since all of the functionality is strictly separated.

I started out just doing require and before but realized that I could stuff the other two in there easily and would prefer to have the functionality if I need it.

Trevor

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/5421D4B1.3010900%40Alumni.TU-Berlin.de.

For more options, visit https://groups.google.com/d/optout.

David Schmitt

unread,
Sep 24, 2014, 2:15:32 AM9/24/14
to puppe...@googlegroups.com
Indeed ;-)
Reply all
Reply to author
Forward
0 new messages