[Puppet Users] Questions about puppet best practices on roles and profiles

2019-04-09 Thread NgeeGoh
Hi all, 

I am new to Puppet and currently doing some Proof of Concept work to see if 
Puppet could fit into our processes. 
I have set up a puppet master server on Azure and a VM with puppet agent 
installed. Since I want to dig in more about the puppet manifests and its 
configuration features, I only use the VM with puppet agent installed as a 
standalone puppet. 
I have also set up a control repo for the puppet with roles/ profiles model

I have a couple of questions about what would be the best practices:
1. I am a bit confused about how to handle resources and data in puppet 
manifest. For example, I got a list of windows features that i need to 
install/ run in JSON file which is located in a resource folder i created 
in the same level as site and manifest, and in the windowsfeature manifest 
(in profile) I load the json data and loop through all the data to install/ 
run the windows features. Would it be nicer and cleaner if i implemented 
Hierra here? To be honest, the implementation of Hierra to me is also not 
very clear.

2. As far as I know, puppet control repo controls different environments 
based on branches which i feel a bit strange, while Chef manages all 
environments under one folder in git which I find its more manageable since 
we can apply the configuration to the different environments with different 
data without worrying about changing git branches. Just wondeirng if we 
could somehow achieve this in puppet or is there any obvious benefits of 
this current model in puppet?

Cheers, 

-- 
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/4fb223fa-0892-4d73-a58a-e564bdb0840d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet 6 facter -p Thread.exclusive is deprecated, use Thread::Mutex

2019-04-09 Thread Andreas Dvorak
Great thank you.
Years ago we created the fact.


Am Freitag, 5. April 2019 18:54:04 UTC+2 schrieb Josh Cooper:
>
>
> On Thu, Apr 4, 2019 at 11:45 PM Andreas Dvorak  > wrote:
>
>> Hi,
>>
>> I have installed a new server with puppet 6.
>>
>> I get these errors with facter. Can somebody please help me?
>>
>> facter -v
>> 3.13.1 (commit 4e1df48f76caa0eaeee90af4239a1df450d45cd7)
>>
>>
>> facter -p osmajorrelease
>> Thread.exclusive is deprecated, use Thread::Mutex
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:20:in 
>> `meminfo_number'
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:13:in `block (3 
>> levels) in '
>> Thread.exclusive is deprecated, use Thread::Mutex
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:20:in 
>> `meminfo_number'
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:13:in `block (3 
>> levels) in '
>> Thread.exclusive is deprecated, use Thread::Mutex
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:20:in 
>> `meminfo_number'
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:13:in `block (3 
>> levels) in '
>> Thread.exclusive is deprecated, use Thread::Mutex
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:20:in 
>> `meminfo_number'
>> /opt/puppetlabs/puppet/cache/lib/facter/meminbytes.rb:13:in `block (3 
>> levels) in '
>> 7
>>
>> puppet-agent-6.4.0-1.el7.x86_64
>> puppetserver-6.3.0-1.el7.noarch
>> puppet6-release-6.0.0-1.el7.noarch
>>
>> Regards
>> Andreas
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/038d99f1-8562-40c3-b993-548374913995%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> The "meminbytes" fact is coming from a module and downloaded to the agent. 
> The Thread.exclusive call is not needed, and likely occurred when 
> copy/pasting from an old core fact in the Ruby facter implementation. We 
> removed that from core Ruby in 
> https://github.com/puppetlabs/facter/commit/159d3a682f141a5183c933be5ef2cf763f59bb6c#diff-5ac9627bb8707b6cf7eb398ec448edb2
>
> Josh
>
> -- 
> Josh Cooper | Software Engineer
> jo...@puppet.com  | @coopjn
>

-- 
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/ede14e7b-ab18-4cc4-978a-9d78dfb77aee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Replace some text

2019-04-09 Thread KRouth Clinipace
My experience with using file_line (i use it elsewhere) is that it replaces
the entire line. (maybe this behavior has been changed, we are running
Puppet 3.8). I am looking for a way to substitute a part of the line,
leaving the rest intact.

thanks :)
kevin

On Tue, Apr 9, 2019 at 1:28 AM Dirk Heinrichs  wrote:

> Am Sonntag, den 07.04.2019, 05:47 -0700 schrieb KRouth Clinipace:
>
> Know i will see the other options proposed here
>
>
> puppetlabs::stdlib -> file_line
>
> Why reinvent the wheel?
>
> Bye...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@opentext.com
> *Website*: www.recommind.de
>
>

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


[Puppet Users] preparing internal fixtures on Beaker VMs for acceptance tests

2019-04-09 Thread Luke Bigum
Hello,

What's the state of the art nowadays for preparing fixtures inside Beaker 
SUTs?  The Beaker module install helper works a treat when all dependencies 
are available on the Forge and listed in the metadata.json file, however it 
doesn't help for internal modules in private SCM repos.

Are people calling r10k or Librarian from inside a Beaker instance to 
download all dependencies?  Are people running internal / private Forges?  
Or are people still doing manual rsync / scp / git cloning repos directly 
into the Beaker instance?

Thanks,

-Luke

-- 
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/6430411a-2dd6-422f-87fe-ad6eb713b470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.