Re: [Puppet Users] Custom type: Ensure array properties are sorted

2019-03-18 Thread Branan Riley
On Fri, Mar 15, 2019 at 8:54 AM Dirk Heinrichs 
wrote:

> Hi,
>
> I've written a custom type that has an array property. I quickly found out
> that it isn't idempotent unless the array is sorted. Turned out that it was
> easy to sort the current values in the provider but I couldn't find out how
> to properly sort the input values w/o putting that burden on the user of
> the type. I tried with munge like this:
>
> newproperty(:array_prop, :array_matching => :all) do
> munge do |value|
> value.sort
> end
> end
> but it seems that just gets the first array element as string, which is
> neither obvious nor intuitive.
>

Instead of using munge, you can write a custom insync? implementation to
compare sorted versions of the current value and the suggested value. It
should look something like this:

newproperty(:array_prop, :array_matching => :all) do
def insync?(is)
is.sort == should.sort
end
end


> Is there any other way than having to use
>
> mytype { 'title':
> ...
> array_prop => sort($array),
> ...
> }
>
> ?
>
> Thanks...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan,
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail sind nicht gestattet.
>
> --
> 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/b50e9e0461472e2300db026f567a8ddec77d5cfc.camel%40opentext.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADWDnrn93bw9s_viVpQ9qsqfFtSoefFWzvse3_mmSAw6Pw026Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How does Puppet EOL work?

2019-02-12 Thread Branan Riley
The open source puppet releases track the PE support lifecycle, available
at https://puppet.com/misc/puppet-enterprise-lifecycle

This means that Puppet 5.5 will be receiving bugfixes until at least May
2020 as part of our support for PE 2018.1. Puppet 6 will likely be
supported for 18-24 months after that, but it depends on which PE version
in the 2019 family becomes the next LTS.

On Tue, Feb 12, 2019 at 10:08 AM Aditya S 
wrote:

> Hi,
>
> I saw the thread
> https://groups.google.com/forum/#!topic/puppet-users/78ZcVVyuIMQ that
> talks about puppet 4 EOL as May 2018. How does the EOL work in general. For
> example EOL for 5.5 or 6.x. Is there a mention for LTS releases? These are
> specific to the Open Source versions of these products. Please let me know.
>
> Thanks!
>
> --
> 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/7092b490-99dd-4de0-8aa0-a14e32016582%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADWDnrn%3DWSRHwzH%2BNXmxO3u05Csw8ryGARTbz_PDLBsYwZjM7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Recent 5.5.x point releases are throwing some warnings for me

2018-08-28 Thread Branan Riley
Hi Jon,

In Puppet 6 we're going to start requiring that the names of
classes/defines match the name that's implied by their file path[1]. We
added that deprecation warning in 5.5.6[2] as part of a push to get
upcoming Puppet 6 changes printing warnings whenever possible.

[1] https://tickets.puppetlabs.com/browse/PUP-1434 and
https://tickets.puppetlabs.com/browse/PUP-4242
[2] https://tickets.puppetlabs.com/browse/PUP-8894


On Tue, Aug 28, 2018 at 8:31 AM  wrote:

> I was away on vacation for a month, upon getting back I am finding the
> Puppet Agent is now throwing a warning on all of the defines I have in a
> module that is applied to all our Linux servers.  (we are auto updating
> point releases)
>
> Warning: Unacceptable location. The name 'remote_file' is unacceptable in
> file '/etc/puppet/modules/seed/manifests/init.pp' (file:
> /etc/puppet/modules/seed/manifests/init.pp, line: 1123, column: 1)
>
> We have several defines in this module, all now causing the same warning
> message and wasn't a few months ago.  I couldn't find anything in the 5.5.x
> release notes to explain why this warning has started to pop up.
>
> In this case the define warned about above looks like:
>
> define remote_file($remote_location=undef, $mode='0644', $owner=undef,
> $group=undef) {
> Code here
> }
>
> Thanks in advance for any ideas anyone might have on why this warning has
> started to pop up.
>
> Jon
>
> --
> 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/673af078-aadf-4c43-8f8a-c451f688a85f%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/673af078-aadf-4c43-8f8a-c451f688a85f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,

Branan Riley
Senior Software Engineer, Puppet inc.

-- 
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/CADWDnrmGkWcac83DvcodRie%3DuswbaBd0M1E-YjUva%2BjViKB-Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] old puppetdb-terminus version no longer available in ubuntu precise apt repo

2018-08-20 Thread Branan Riley
Hi Michael,

We've started archiving very old packages to simplify our repositories. The
announcement was made a couple of weeks ago:
https://groups.google.com/d/msgid/puppet-dev/95465939-3051-e98c-7e22-8448c8a6dcce%40puppet.com

On Mon, Aug 20, 2018 at 12:42 PM Michael Liao  wrote:

> Hi,
>
> We've been pinning our puppet setup to puppetdb-terminus 1.1.1-1 in the
> precise apt repo for quite some time now, but I now noticed that package is
> no longer available in the precise pool. Is this intentional? 1.1.1-1 is
> still listed in the Packages list in the same repo. The precise pool only
> has 1.4+ now.
>
> http://apt.puppetlabs.com/dists/precise/main/binary-amd64/Packages
> (puppetdb-terminus 1.1.1-1 is listed here)
> http://apt.puppetlabs.com/pool/precise/main/p/puppetdb/
> (puppetdb-terminus 1.1.1-1 is no longer available here)
>
> Thanks,
> Michael
>
> --
> 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/a7a3b4b8-1f72-4ecd-abbb-30d591fe0fce%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/a7a3b4b8-1f72-4ecd-abbb-30d591fe0fce%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,

Branan Riley
Senior Software Engineer, Puppet inc.

-- 
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/CADWDnrk3T%3DyzqwhCUC4oUvF-h_No4SncoYOuSytx5L782kg%3DEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet 4 open source EOL

2018-08-15 Thread Branan Riley
That's correct. At this point we have no more scheduled PC1 releases, and
would only do one for a security issue. In October we will stop releasing
it entirely.

The new PE LTS release is based on puppet-agent 5.5.z, so that release will
be receiving fixes until May of 2020. We are also planning to have Puppet 6
available in the fall.

On Wed, Aug 15, 2018 at 9:49 AM Nick Bertrand  wrote:

> Hi all,
>
> I've found a few mentions that Puppet 4, specifically Puppet Collection 1,
> reaches end-of-life October 2018. Does this mean that
> http://yum.puppetlabs.com/el/7/PC1/, for example, will no longer get
> security or other fixes backported after October 2018?
>
> Thanks,
>
> Nick Bertrand
>
> --
> 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/db6a6b11-9d60-4186-9b1c-a1d9e8933fad%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/db6a6b11-9d60-4186-9b1c-a1d9e8933fad%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,

Branan Riley
Senior Software Engineer, Puppet inc.

-- 
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/CADWDnr%3D0xsuajGuyybq0UcSbxRf4i2f3TN-%3DL%3D4rxjDTKh1Mbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet agent 1.10.14, 5.3.8, and 5.5.3 are now available

2018-06-15 Thread Branan Riley
Hi Dirk,

The 1.10.x agent (and thus all of PC1) is in an extended support phase
right now, coinciding with the PE 2016.4 lifecycle:
https://puppet.com/misc/puppet-enterprise-lifecycle. This means it is
receiving critical fixes only, and we are not adding new platforms to it.
The current plan is to end-of-life it completely in October.

Puppet 5.5 is part of the next PE LTS, and will be receiving bugfixes until
2020 as part of our support for that release. Our recommendation is that
you update to Puppet 5.

I can't find an announcement that we've sent to this list, so I think this
is on us. I apologize for that, and will look in to getting a message sent
out communicating the extended support status more broadly.

On Thu, Jun 14, 2018 at 10:39 PM Dirk Heinrichs 
wrote:

> *From:* puppet-users@googlegroups.com [mailto:
> puppet-users@googlegroups.com] *On Behalf Of *Molly Waggett
>
> > There are Bionic packages in the puppet-agent 5.5.x stream:
> http://apt.puppetlabs.com/pool/bionic/puppet5/p/puppet-agent/
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__apt.puppetlabs.com_pool_bionic_puppet5_p_puppet-2Dagent_&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=O_wJr1yIdQhOxwbpN_t-lKItwS1nDauiXzrFG4U90ak&s=2BgSdhE7KtINpzbQHjldOka7dbtOLYw9AmG1QdVocJ0&e=>
>
>
>
> Yes, Puppet 5 ones. What about PC1?
>
>
>
> Bye...
>
>
>
> Dirk
>
> --
>
> *Molly Waggett*
>
> she/her/hers
>
> Release Engineer @ Puppet, Inc.
>
> --
> 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/CAFOE68Aj5V%2Bd0jt4OcZ5MyxrAhG2RR7FrMrGd--i44BK59rF5A%40mail.gmail.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_puppet-2Dusers_CAFOE68Aj5V-252Bd0jt4OcZ5MyxrAhG2RR7FrMrGd-2D-2Di44BK59rF5A-2540mail.gmail.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=O_wJr1yIdQhOxwbpN_t-lKItwS1nDauiXzrFG4U90ak&s=iGN1LQgaUvW5HE4UHHW_l6IIgmZMlE5cLCNzUxjK5x4&e=>
> .
> For more options, visit https://groups.google.com/d/optout
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwMFaQ&c=ZgVRmm3mf2P1-XDAyDsu4A&r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&m=O_wJr1yIdQhOxwbpN_t-lKItwS1nDauiXzrFG4U90ak&s=7XkMdr4C1yzltbZgqeBlUxnNOvr_J0qXc7-n25jHmrU&e=>
> .
>
> --
> 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/DM3PR15MB08771E4373DBAA9EEB09C7C4AA7C0%40DM3PR15MB0877.namprd15.prod.outlook.com
> <https://groups.google.com/d/msgid/puppet-users/DM3PR15MB08771E4373DBAA9EEB09C7C4AA7C0%40DM3PR15MB0877.namprd15.prod.outlook.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,

Branan Riley
Senior Software Engineer, Puppet inc.

-- 
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/CADWDnrmZQO5piD8VbtW1DgEBJBp2T3uvXO12d6zLHvK0k97cQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Packages for Fedora 27

2018-03-06 Thread Branan Riley
Hi Sebastian,

We know the addition of new platforms has been lagging, and we apologize
for that. Fedora 27 is almost done, and should start appearing in our
nightly repository soon (possibly tonight, if our automated testing all
passes).

We've been working on cleaning up our packer[1] scripts to make setting up
our build/test environments quicker. We have also made some process changes
to how we keep track up upcoming distro releases, in order to better get
ahead of the curve. We're still catching up, but we hope we won't lag quite
so far behind on future new OS releases.

[1]  https://github.com/puppetlabs/puppetlabs-packer

On Tue, Mar 6, 2018 at 7:24 AM 'Sebastian Himmler' via Puppet Users <
puppet-users@googlegroups.com> wrote:

> Hi all,
>
> I've encountered a really slow respondence of puppet to new fedora
> releases. E.g. now, there is no package for fedora 27 and it"s out for 3
> month or so now...
>
> Can I help you building the package? if there is some doc for 25/26 I
> could build packages for 27 and future releases for the time of release.
>
> Thanks
>
> Sebastian
>
> --
> 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/89dd2fa9-93fb-42f4-bc36-add27522360d%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/89dd2fa9-93fb-42f4-bc36-add27522360d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,

Branan Riley
Senior Software Engineer, Puppet inc.

-- 
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/CADWDnr%3Dp1e6L6zxM6-u9iKKUkwk4OZ%3DkJdkm8MO-%2BjFEr5Pd2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [Puppet-dev] Ticket Backlog triages

2017-05-15 Thread Branan Riley
Hi All,

We're starting this triage process today, and it will last through
Wednesday.

On Thu, Mar 23, 2017 at 3:55 PM Eric Sorenson  wrote:

> Hi All – we're trying to get on top of the backlogs of Jira tickets. Those
> of you who have been around for a while might remember this was the
> original purpose of the "Triage-A-Thon" events, when we parcelled out
> batches of Redmine tickets for categorization, clean-up, and
> prioritization. (Hi, @kartar!)
>
> I wanted to let everyone know that this activity is going on, so if you
> see updates on long-dormant Jira tickets it doesn't come as a surprise.
> Although the commentary as we're dispositioning the tickets is boilerplate
> copy-pasta, these are not automatic mass-closures. Teams are going through
> the tickets in batches and spending some time on each one. If you get mail
> about a ticket that you feel is dispositioned incorrectly (such as "Cannot
> reproduce", when you can provide a repro case), please re-open them.
>
> Additionally, if you're interested in helping out, the query we're working
> through is publicly available here:
> https://tickets.puppetlabs.com/issues/?filter=25600#
>
> The workflow and response text for triaging tickets is available here:
>
> https://docs.puppet.com/community/puppet_projects_workflow.html#workflow-for-bugs
>
> The benefit at the end of all of this will be that we will be able to
> provide much better response time for new issues as they come in.
>
> Eric Sorenson - e...@puppet.com
> director of product, ecosystem and platform
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/B4C79B78-F85E-42E9-A0D9-5830D4640843%40puppet.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Regards,

Branan Riley
Senior Sofware Engineer, Puppet inc.

-- 
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/CADWDnr%3D%3DoCurj29EBFRVQzuYZDyxV20y4e-GfKiBEOubp%3DYLVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Custom Facts using awk

2017-03-23 Thread Branan Riley
On Wed, Mar 22, 2017 at 4:07 PM Peter Bukowinski  wrote:

> Hi Warron,
>
> I'd consider using an external, executable fact to avoid ruby altogether.
>
>
> https://docs.puppet.com/facter/3.6/custom_facts.html#executable-facts-unix
>
> Basically, you can write a bash script (or use any language you want),
> drop it into '//facts.d/' on your puppet server,
> and it will be synced to all your nodes (assuming you use pluginsync).
>
> The only requirement for executable fact scripts is that they must
> return key/value pairs in the format 'key=value'. Multiple keys/values
> get their own line. In your case, you could do something like this:
>

We actually now support JSON and YAML output from executable facts as well.
This made it into the release notes, but it looks like the main docs didn't
get updated for the feature. I'll work with our documentation team to get
that updated!

For a bash script doing awk transformations, though, the key=value syntax
is likely easier.

Branan Riley
Software Engineer, Puppet Inc.


> -
> #!/bin/bash
>
> key="qty_monitors_total"
> value=$(your parsing command for /var/log/Xorg.0.log here)
>
> echo "${key}=${value}"
> -
>
> Save the file as an executable script in the above mentioned path and
> it should be available on the next puppet run.
>
> On Wed, Mar 22, 2017 at 3:24 PM, warron.french 
> wrote:
> > Hello, I have finally learned how to write a Custom Fact; and duplicated
> the
> > syntax several times over inside the same .rb file.
> >
> > I am using syntax that looks like the following:
> >
> > Facter.add('qty_monitors_total') do
> >   setcode  do
> >  Facter::Util::Resolution.exec('/bin/grep " connected"
> > /var/log/Xorg.0.log | cut -d\) -f2,3,4 | grep GPU |sort -u | wc -l')
> >   end
> > end
> >
> > I don't know of any other way to do this yet; but that's not my concern
> yet.
> >
> > What I would like to know is how can I use an awk command within the
> > Facter::Util::Resolution.exec('.') line.
> >
> > I have a need to essentially reproduce the line above but drop   wc -l
> and
> > add awk '{ print $2"_"$3"_on_"$1$4 }'
> >
> > I need the awk command to pretty much look like this; the problem is awk
> > uses its own single quotes (') and it will break the ruby code.
> >
> > I am not a ruby developer; so if someone could either tell me:
> >
> > It's just not possible; or
> > do it this way
> >
> >
> > That would be greatly appreciated.  Thank you,
> >
> > --
> > Warron French
> >
> > --
> > 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/CAJdJdQmZXQAd%2Bo%2Bnp-NHqxGHnXubf%2Bac-dP5FPoy4QYMEVuBuA%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/CAJA1CN9aFH4Eza-FoxzrfXDWiGCUHXE%2BGFt2Nu%3DjK2eDzV4upg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADWDnrkjxbwkAosu_02dUi1_b--%3D_H9p15SHxwuaO5NU5HTzbQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Facter error: empty packages.json

2017-03-06 Thread Branan Riley
Hi Adam,

The related code in Facter is at
https://github.com/puppetlabs/facter/blob/master/lib/src/facts/external/json_resolver.cc#L211-L214

It appears that the JSON library we use (RapidJSON) considers an empty file
to be an error condition, and we just raise that up without introspecting
it. The library provides enough information for us to detect this
particular case and report it at a lower logging level than error (warning
or info). The docs for the RapidJSON result type are at
http://rapidjson.org/group___r_a_p_i_d_j_s_o_n___e_r_r_o_r_s.html#structrapidjson_1_1_parse_result

I've filed a ticket at https://tickets.puppetlabs.com/browse/FACT-1581 to
track this. I can't speak to when we'll get around to it internally, but we
will of course be happy to review a PR if you or somebody else tries to fix
it before we do.



Branan Riley
Software Engineer, Puppet Inc.

On Fri, Mar 3, 2017 at 10:18 AM Adam Mercer  wrote:

> On Wed, Mar 1, 2017 at 6:50 PM, Adam Mercer  wrote:
>
> > Error: Facter: error while processing
> > "/opt/puppetlabs/facter/facts.d/packages.json" for external facts: The
> > document is empty.
>
> I have now started seeing this on both Debian 8 and Ubuntu 16.04. Any
> ideas where to start debugging this?
>
> Cheers
>
> Adam
>
> --
> 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/CA%2Bmfgz2EgPmddChypY38AWAMsq9XhUAGJ%3D5w_0CG--4iJRZQ6Q%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADWDnrmsJ7O0VSkHypLe5OUXTFOZmGt3c64T%2B%2BsBQmwVnBYLcQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Facter 2.4.6 Available

2016-01-26 Thread Branan Riley
Facter 2.4.6 reverts the changes made for FACT-380. It is otherwise
identical to Facter 2.4.5.

To download Facter, follow the instructions here:
http://docs.puppetlabs.com/puppet/3.8/reference/pre_install.html

Release notes are available here:
https://docs.puppetlabs.com/facter/2.4/release_notes.html#facter-246


Branan Riley
Software Engineer, Puppet Labs

-- 
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/CADWDnrmjfkGPBiRHP9FhSBRs02P31MhdFyWvHqFPY%3DVEHNVZzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] "signalling" inside a puppet provider?

2015-12-03 Thread Branan Riley
On Tue, Dec 1, 2015 at 7:48 AM Peter Berghold 
wrote:

> Given the following pattern in a puppet manifest:
>
> file{ 'some/file/foo':
>   content => 'blah blah blah',
>   notify => Exec['talkaboutfoo']
> }
> exec { 'talkaboutfoo':
>  cmd => "some/command/some/where",
>  subscribe => File['some/file/foo']
> }
>
> with a little bit of hand waving.
>
> Is there something similar in a custom provider?  Reason I'm asking is I
> have
> written a custom provider for a very customized piece of locally grown
> software that ideally one of the configuration parameters
>
> mytype{ 'instance':
>  state => "on",  # this parameter
>  parm1=> "a",
>  parm2=> "b",
>  parm3=>"c"
> }
>
> should be set *last* among all the other parameters.
>
> Is there a way to do that?
>
>
Hi Peter,

You can do this by implementing a `flush` method on your provider. The
typical pattern is that each individual property setter just stores the
value into an instance variable that is a hash of property_name=>value
pairs (normally called @property_hash), and then `flush` does all the work
of actually writing those values. This will allow you to order the actual
interactions with the real world however you need.


Gary Larizza's blog has some great posts on Provider development -
http://garylarizza.com/blog/2013/12/15/seriously-what-is-this-provider-doing/
contains the information on @property_hash, but if you're new to writing
types and providers I'd recommend reading the first two (linked from that
one) as well to make sure you have all the context.


Branan Riley
Software Engineer, Puppet Labs

-- 
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/CADWDnr%3D4ifafTrM26YVNWTdU9DVsXNz4HmdXS4Z%3DYn83Ec1qoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter 3.1 gem

2015-10-19 Thread Branan Riley
On Mon, Oct 19, 2015 at 9:02 AM seincin  wrote:

> Curious why there has not been a Facter 3.X gem made available?
>

Facter 3 is written in C++ and relies on a VERY modern version of GCC, as
well as new versions of a number of libraries. These are not available on
most of the platforms Puppet supports. If we were to ship a gem, we would
have to somehow ensure that these were on the system.

Any timeline on a release?
>

Due to the issues described above, we have no plans to ship a Facter 3 gem.


Branan Riley
Software Engineer, Puppet Labs

-- 
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/CADWDnrnR_nYNzb-qku2%2BR5mOvmod2o1LqCW5ePtiDvxcnbQ_Ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] create puppet module from software install

2015-05-14 Thread Branan Riley
On Thu, May 14, 2015 at 10:11 AM,  wrote:

> I have installed apache and tomcat from source in the /opt directory.
> Once I completed the install I modified the directory and file ownership
> and permissions.
> I also modified the .conf and .xml files for both tomcat and apache.
> Is there a way to capture a directory structure and the modifications and
> then create a puppet module from this info?
> would I use puppet resource or do I need to entre the info by hand?
> Thanks
>

I would recommend that you build a package, which you can then deploy with
Puppet. You may still wish to manage the configuration files separately
witha  module, and that's definitely find (and encouraged). Since it sounds
like you mostly just want to bundle up a directory, fpm[1] might be all you
need.

Using a native package will make it much easier when you need to upgrade
(and you will, eventually). It will also allow easy auditing of which
version of the software is running on each system in your infrastructure.

If for some reason you don't want to use a package (and I STRONGLY
recommend that you create a proper system package), you can also just make
a tarball and use the staging[2] or archive[3] modules to deploy it with
Puppet.

[1] https://github.com/jordansissel/fpm
[2] https://forge.puppetlabs.com/nanliu/staging
[3] https://forge.puppetlabs.com/nanliu/archive


Branan Riley
Software Engineer, Puppet Labs

-- 
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/CADWDnrmdAKo00%3Dins0%3D4DWZyzWEArGztnujGXwXbG-KKoSd3MA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.