[Puppet Users] Re: Need help with simple hiera example

2014-10-08 Thread Stack Kororā
Ack! So I put the '$testvar = $repos::testvar' line in the class header for 
both the init.pp and the epel.pp (which is a subclass in repos). I removed 
it out of epel.pp and the init.pp started to print!!! That makes zero sense 
to me! So I removed it and the notify out of init.pp and put them in 
epel.pp and they both stop functioning!

Can subclasses not reference hiera data? That seems really weird

OK...seriously...going to bed now... :-)

-- 
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/360c8749-e40b-4f19-a661-ae8162f88ddb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Need help with simple hiera example

2014-10-08 Thread Stack Kororā
Just so that the code is out there and my point made.

$ cat hieradata/hosts/puppet.test.vm.yaml
---
repos::reponetwork: one
repos::testvar: repotestvar
testhiera::test: blah
testhiera::testvar: testhieratestvar

$ cat modules/testhiera/manifests/init.pp 
class testhiera ( $testvar = $testhiera::testvar ) {
#class testhiera ( $test = $testhiera::test ) {
  notify { "$testvar on $clientcert":}
}

$ puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet.test.vm
Info: Applying configuration version '1412825217'
Notice: 2 testhieratestvar on puppet.test.vm
Notice: /Stage[main]/Testhiera/Notify[testhieratestvar on 
puppet.test.vm]/message: defined 'message' as '2 testhieratestvar on 
puppet.test.vm'
Notice:  on puppet.test.vm 
Notice: /Stage[main]/Repos/Notify[ on puppet.test.vm ]/message: defined 
'message' as ' on puppet.test.vm '
Notice: Finished catalog run in 0.04 seconds

Testhiera works, Repos doesn't. 

Here is another interesting tidbitIf I pull that notify into a subclass 
of testhierait too stops working Ugh...I think it is time for me to 
go to sleep...this obviously isn't sinking in...

-- 
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/99fcad86-60c1-4614-a8e2-9814aa84c174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Need help with simple hiera example

2014-10-08 Thread Stack Kororā
OK, I am beginning to question either puppet+hiera's reliability or my 
sanity...

I have code I am working on. It is existing code in which has a bunch of 
variables prime for hiera use. I pull one variable out of the code into 
hiera for testing and it works well. Tweak the code and now I am only using 
hiera for that variable. Hooray!

Then i pull a second variable out. Nothing in hiera works now. There is 
*nothing* in the --debug log about hiera except for when it reads the 
/etc/puppet/hiera.yaml file and a few SELinux context pieces. Well that is 
weird. I didn't do anything different that I can tell...so I will revert 
back to my git commit to the last working state (the first variable). 
Nothing. I can't get it to do anything at all. I am at a complete loss as 
to why it stopped working.

On a hunch I did a 'sudo service puppetmaster restart' and the first 
variable started working again! Hooray! Why puppetmaster needs a restart, I 
have NO idea but whatever. Lets add a test dummy variable into hiera and do 
a simple notify. Nope. Broken again. Maybe another puppetmaster restart? 
Still no.

So either hiera is only capable of doing a single variable, or it /really/ 
hates me. I am willing to bet on the latter.

My code is literally only a single line in the hiera file (one for the host 
and one for common) 'repos::testvar blah' and 'repos::testvar yadda' and in 
my init.pp file I just added the one line in the declaration 
'$testvar=$repos::testvar' and in the class body I added 'notify {"test 
$testvar":}'. That apparently is enough to break puppet's integration with 
hiera Even a 'sudo service puppetmaster restart' doesn't fix that..If I 
reset those three lines then reset the puppetmaster, it start working 
again...

Well, maybe it is the code? Other then the name change there is nothing 
different than my SimpleHiera test. So I threw the notify code into that, 
and it works! In fact, the code working in the SimpleHiera test case I 
built earlier /while the other class is still enabled/. The repos class 
fails while the test code works! o_O Just to clarify that point. The 
SAME code works in one module but not in the other! (obviously I changed 
the top level scope of the variables to match the module it was being 
referenced in; but the code is otherwise identical) Thus, puppet+hiera has 
a selective memory on which time it feels like looking up hiera 
data...That sounds like a product I want to trust in production! 


How do people debug hiera in puppet? Everything /always/ works on the 
command line so I really don't think it is hiera nor my configuration of 
hiera. And there is never anything of use in the puppet logs. At least 
nothing I see with a 'puppet agent -t | egrep "hiera|repos|testvar". 

I have *got* to be missing something. I feel that the average puppet+hiera 
dev doesn't struggle constantly with puppet suddenly forgetting how to use 
hiera everytime they add a new variable. But I am at a loss as to what i am 
doing wrong...

Any help would be greatly appreciated. 

Thanks!
~Stack~

-- 
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/2ba2097a-47b1-449f-b598-f9b6de31262d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Need help with simple hiera example

2014-10-08 Thread Stack Kororā
In case anyone else struggles with Hiera and needs a simple example:
https://github.com/cstackpole/SimpleHiera

That is my code so you don't have to try to cut'n'paste out of a forum 
post. If I learn anything else useful, I will shove it into the repo too.

~Stack~

-- 
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/9ef1a5eb-2f8d-41b7-9395-f47353111f66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Need help with simple hiera example

2014-10-08 Thread Stack Kororā
Greetings Corey,

Thank you for your advice.

If it was as simple as the clientcert being wrong, then it should have been 
hitting the default hiera option, but it wasn't pulling back anything at 
all. I honestly don't think it was even looking at hiera as I saw nothing 
about it in the logs.

We actually switched from fqdn to clientcert because we found clientcert 
more reliable. We have a significant number of laptops that travel between 
networks and would respond back with different fqdn depending on what 
wireless hub they were on (don't even get me started on the network 
team...we have frequent disagreements on things:-D ).

However, I did get it working and you reaffirmed something I had 
discovered. So thank you very much for responding. I do appreciate it.

__


Greetings all that are following this saga...

For those following along with my code above, I mistyped hieratest in my 
first email but in the file it is correct (that's what I get for retyping 
instead of mucking with copy/paste from the VM :D ):
$ cat hosts/puppet.test.vm.yaml 
---
hieratest::test: yadda



Since the documentation is near rubbish on hiera, I started digging around 
in the code itself for the hiera projects that _do_ work for me. I noticed 
that there were two methods that seemed to pop up frequently.

1) The method Corey mentioned:
$bar = hiera('myfoo::bar', 'defaultvalue')

However, the puppet docs basically say do this for 2.7 but not for 3+ [ 
https://docs.puppetlabs.com/hiera/1/puppet.html ]. Also note that there are 
two examples on that page which completely fail (silently...at least in my 
example code).
THIS DOESN'T WORK:
1.1) class myclass ( $parameter_one = hiera('myclass::parameter_one', 
'default text') 
1.2) class myclass ($parameter_one = "default text") { ...content => 
$parameter_one, ...}

The first I couldn't get working until I pulled it into the body of the 
class as Corey mentioned. Putting it in the class definition wouldn't work 
for me as it is listed in the documentation.
The second will /always/ go to 'default text' for me. It has yet to pull 
back the hiera data.

2) $ cat modules/testhiera/manifests/init.pp 
class testhiera ( $test = $hieratest::test ) {
  file { "/tmp/$test" : ensure => present}
}


Since I started adopting the second method ( shortly after lunch ) it has 
been working well. I am migrating a few of the simpler puppet modules I 
have written to hiera and I totally get the value of hiera. I kinda wish I 
had started sooner. But to spend that much time and effort on such a simple 
example, it's no wonder so many people avoid starting with it. I wonder how 
many people just give up after the example code doesn't work for them...

But, its working now! Hooray! 

~Stack~

-- 
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/1bebca03-620e-4bc8-b9ee-cdf5d083490f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] annoying "allow_virtual parameter" warning

2014-10-08 Thread Tim Dunphy
Hi Spencer,

 Oh I called it "puppetboard unable to reach puppetb" and sent it to the
puppet users group. Any help there would be fantastic!


Thanks!
Tim

On Wed, Oct 8, 2014 at 8:45 PM, Spencer Krum  wrote:

> What puppetboard thread?
> On Oct 8, 2014 4:34 PM, "Tim Dunphy"  wrote:
>
>> Hi Spencer
>>
>> Some people are working around the first issue by doing a:
>>> if verscmp($::puppetversion, 3.6.0) {
>>>Package { allow_virtual => true,
>>> }
>>>
>>> You could do that, and possibly a comparison to the rubyversion fact as
>>> well.
>>
>>
>> Thats' FANTASTIC!!! I put that in my production environment's site.pp.
>> And now all my puppet nodes are working without that annoying warning
>> message! Thank you for that!
>>
>> Also would someone mind weighing in on my puppetboard thread? LOL I'm
>> dying to solve that one as well.
>>
>> Thank you ALL!!
>>
>> Tim
>>
>> On Wed, Oct 8, 2014 at 12:19 AM, Spencer Krum 
>> wrote:
>>
>>> Hi Tim,
>>>
>>> Some people are working around the first issue by doing a:
>>>
>>> if verscmp($::puppetversion, 3.6.0) {
>>>Package { allow_virtual => true,
>>> }
>>>
>>>
>>> You could do that, and possibly a comparison to the rubyversion fact as
>>> well.
>>>
>>>
>>> Thanks,
>>> Spencer
>>>
>>> On Tue, Oct 7, 2014 at 5:45 PM, Tim Dunphy  wrote:
>>>
 Hmm, my OS X 10.9.5 reports:
> ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
> While I believe ruby 2.2 is still in preview:
>
> https://www.ruby-lang.org/en/news/2014/09/18/ruby-2-2-0-preview1-released/
> Kylo



 Yeah it's interesting that Mac OS X includes a preview version of ruby.
 I was also surprised to find it on my Amazon AWS Linux instances in EC2. I
 wonder if there are any more linux distros out there using it? I haven't
 really checked into it.

 But I found that I pretty much have to live with that annoying
 allow_virtual parameter warning. To fix the Amazon Linux nodes I had to do
 the whole remove cert then re-add routing. After taking out the

 Package {
   allow_virtual => true,

 }

 Setting from site.pp for my production environment. Better to have the
 warning than to break puppet. :)

 Thanks
 Tim

 On Tue, Oct 7, 2014 at 8:09 PM, Kylo Ginsberg 
 wrote:

> On Tue, Oct 7, 2014 at 12:31 PM, Tim Dunphy 
> wrote:
>
>> What's the 2.2 error?
>>> Also FYI we're doing zero testing with ruby 2.2 at this time.
>>
>>
>>
>> Hi Kaylo,
>>
>>  The error that I'm getting is this one:
>>
>> err: Failed to apply catalog: Invalid parameter allow_virtual at
>> /etc/puppet/environments/production/modules/puppet/manifests/install.pp:5
>>
>> And zero testing with ruby 2.2? Well that's the version that comes
>> with the latest version of Mac OS X (Mavericks)
>>
>
> Hmm, my OS X 10.9.5 reports:
>
> ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
>
> While I believe ruby 2.2 is still in preview:
>
>
> https://www.ruby-lang.org/en/news/2014/09/18/ruby-2-2-0-preview1-released/
>
> Kylo
>
>
>
>> and Amazon AWS Linux.. Not sure what other flavors of Unix come with
>> this by default. But based on that alone maybe it's time? Maybe look into
>> what other new distros are on 2.2?  I know you guys are busy, but as we 
>> all
>> know, you can't stop the wheels of time from grinding forward! ;)
>>
>> Thanks
>> Tim
>>
>>
>> On Tue, Oct 7, 2014 at 12:14 PM, Kylo Ginsberg 
>> wrote:
>>
>>> On Tue, Oct 7, 2014 at 7:26 AM, Tim Dunphy 
>>> wrote:
>>>
 Hey guys,

  I kept getting this annoying warning in the output of my puppet
 runs:


 Warning: The package type's allow_virtual parameter will be
 changing its
 default value from false to true in a future release. If you do not
 want to
 allow virtual packages, please explicitly set allow_virtual to
 false.
 (at /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:816:in `set_default')


 So I found this article:

 https://inuits.eu/blog/puppet-361-depreciation-warning

 That suggesting putting this value in your site.pp for your
 environment:

 Package {
   allow_virtual => true,
 }

 Which DOES suppress that annoying output on the majority of the
 hosts. But a few of them have ruby 2.2 installed on some of the newer 
 OSs.

 And all the hosts with the newer ruby throw the following error
 instead of performing clean puppet runs like the hosts with the older
 rubies (1.8.7 and 1.9.3).

>>>
>>> What's the 2.2 error?
>>>
>>> Also FYI we're doing zero testing with ruby 2.

Re: [Puppet Users] annoying "allow_virtual parameter" warning

2014-10-08 Thread Spencer Krum
What puppetboard thread?
On Oct 8, 2014 4:34 PM, "Tim Dunphy"  wrote:

> Hi Spencer
>
> Some people are working around the first issue by doing a:
>> if verscmp($::puppetversion, 3.6.0) {
>>Package { allow_virtual => true,
>> }
>>
>> You could do that, and possibly a comparison to the rubyversion fact as
>> well.
>
>
> Thats' FANTASTIC!!! I put that in my production environment's site.pp. And
> now all my puppet nodes are working without that annoying warning message!
> Thank you for that!
>
> Also would someone mind weighing in on my puppetboard thread? LOL I'm
> dying to solve that one as well.
>
> Thank you ALL!!
>
> Tim
>
> On Wed, Oct 8, 2014 at 12:19 AM, Spencer Krum 
> wrote:
>
>> Hi Tim,
>>
>> Some people are working around the first issue by doing a:
>>
>> if verscmp($::puppetversion, 3.6.0) {
>>Package { allow_virtual => true,
>> }
>>
>>
>> You could do that, and possibly a comparison to the rubyversion fact as
>> well.
>>
>>
>> Thanks,
>> Spencer
>>
>> On Tue, Oct 7, 2014 at 5:45 PM, Tim Dunphy  wrote:
>>
>>> Hmm, my OS X 10.9.5 reports:
 ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
 While I believe ruby 2.2 is still in preview:

 https://www.ruby-lang.org/en/news/2014/09/18/ruby-2-2-0-preview1-released/
 Kylo
>>>
>>>
>>>
>>> Yeah it's interesting that Mac OS X includes a preview version of ruby.
>>> I was also surprised to find it on my Amazon AWS Linux instances in EC2. I
>>> wonder if there are any more linux distros out there using it? I haven't
>>> really checked into it.
>>>
>>> But I found that I pretty much have to live with that annoying
>>> allow_virtual parameter warning. To fix the Amazon Linux nodes I had to do
>>> the whole remove cert then re-add routing. After taking out the
>>>
>>> Package {
>>>   allow_virtual => true,
>>>
>>> }
>>>
>>> Setting from site.pp for my production environment. Better to have the
>>> warning than to break puppet. :)
>>>
>>> Thanks
>>> Tim
>>>
>>> On Tue, Oct 7, 2014 at 8:09 PM, Kylo Ginsberg 
>>> wrote:
>>>
 On Tue, Oct 7, 2014 at 12:31 PM, Tim Dunphy 
 wrote:

> What's the 2.2 error?
>> Also FYI we're doing zero testing with ruby 2.2 at this time.
>
>
>
> Hi Kaylo,
>
>  The error that I'm getting is this one:
>
> err: Failed to apply catalog: Invalid parameter allow_virtual at
> /etc/puppet/environments/production/modules/puppet/manifests/install.pp:5
>
> And zero testing with ruby 2.2? Well that's the version that comes
> with the latest version of Mac OS X (Mavericks)
>

 Hmm, my OS X 10.9.5 reports:

 ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]

 While I believe ruby 2.2 is still in preview:


 https://www.ruby-lang.org/en/news/2014/09/18/ruby-2-2-0-preview1-released/

 Kylo



> and Amazon AWS Linux.. Not sure what other flavors of Unix come with
> this by default. But based on that alone maybe it's time? Maybe look into
> what other new distros are on 2.2?  I know you guys are busy, but as we 
> all
> know, you can't stop the wheels of time from grinding forward! ;)
>
> Thanks
> Tim
>
>
> On Tue, Oct 7, 2014 at 12:14 PM, Kylo Ginsberg 
> wrote:
>
>> On Tue, Oct 7, 2014 at 7:26 AM, Tim Dunphy 
>> wrote:
>>
>>> Hey guys,
>>>
>>>  I kept getting this annoying warning in the output of my puppet
>>> runs:
>>>
>>>
>>> Warning: The package type's allow_virtual parameter will be changing
>>> its
>>> default value from false to true in a future release. If you do not
>>> want to
>>> allow virtual packages, please explicitly set allow_virtual to false.
>>> (at /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:816:in `set_default')
>>>
>>>
>>> So I found this article:
>>>
>>> https://inuits.eu/blog/puppet-361-depreciation-warning
>>>
>>> That suggesting putting this value in your site.pp for your
>>> environment:
>>>
>>> Package {
>>>   allow_virtual => true,
>>> }
>>>
>>> Which DOES suppress that annoying output on the majority of the
>>> hosts. But a few of them have ruby 2.2 installed on some of the newer 
>>> OSs.
>>>
>>> And all the hosts with the newer ruby throw the following error
>>> instead of performing clean puppet runs like the hosts with the older
>>> rubies (1.8.7 and 1.9.3).
>>>
>>
>> What's the 2.2 error?
>>
>> Also FYI we're doing zero testing with ruby 2.2 at this time.
>>
>> Kylo
>>
>>
>>>
>>> And I notice that I can't get puppet to work on the ruby 2.2 hosts
>>> even after deleting that allow_virtual override from my site.pp.
>>>
>>> So how do I fix the nodes with the newer ruby? Is there any value I
>>> can set that will make that annoying error message go away, yet allow 
>>> the

Re: [Puppet Users] annoying "allow_virtual parameter" warning

2014-10-08 Thread Tim Dunphy
Hi Spencer

Some people are working around the first issue by doing a:
> if verscmp($::puppetversion, 3.6.0) {
>Package { allow_virtual => true,
> }
>
> You could do that, and possibly a comparison to the rubyversion fact as
> well.


Thats' FANTASTIC!!! I put that in my production environment's site.pp. And
now all my puppet nodes are working without that annoying warning message!
Thank you for that!

Also would someone mind weighing in on my puppetboard thread? LOL I'm dying
to solve that one as well.

Thank you ALL!!

Tim

On Wed, Oct 8, 2014 at 12:19 AM, Spencer Krum 
wrote:

> Hi Tim,
>
> Some people are working around the first issue by doing a:
>
> if verscmp($::puppetversion, 3.6.0) {
>Package { allow_virtual => true,
> }
>
>
> You could do that, and possibly a comparison to the rubyversion fact as
> well.
>
>
> Thanks,
> Spencer
>
> On Tue, Oct 7, 2014 at 5:45 PM, Tim Dunphy  wrote:
>
>> Hmm, my OS X 10.9.5 reports:
>>> ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
>>> While I believe ruby 2.2 is still in preview:
>>>
>>> https://www.ruby-lang.org/en/news/2014/09/18/ruby-2-2-0-preview1-released/
>>> Kylo
>>
>>
>>
>> Yeah it's interesting that Mac OS X includes a preview version of ruby. I
>> was also surprised to find it on my Amazon AWS Linux instances in EC2. I
>> wonder if there are any more linux distros out there using it? I haven't
>> really checked into it.
>>
>> But I found that I pretty much have to live with that annoying
>> allow_virtual parameter warning. To fix the Amazon Linux nodes I had to do
>> the whole remove cert then re-add routing. After taking out the
>>
>> Package {
>>   allow_virtual => true,
>>
>> }
>>
>> Setting from site.pp for my production environment. Better to have the
>> warning than to break puppet. :)
>>
>> Thanks
>> Tim
>>
>> On Tue, Oct 7, 2014 at 8:09 PM, Kylo Ginsberg 
>> wrote:
>>
>>> On Tue, Oct 7, 2014 at 12:31 PM, Tim Dunphy 
>>> wrote:
>>>
 What's the 2.2 error?
> Also FYI we're doing zero testing with ruby 2.2 at this time.



 Hi Kaylo,

  The error that I'm getting is this one:

 err: Failed to apply catalog: Invalid parameter allow_virtual at
 /etc/puppet/environments/production/modules/puppet/manifests/install.pp:5

 And zero testing with ruby 2.2? Well that's the version that comes with
 the latest version of Mac OS X (Mavericks)

>>>
>>> Hmm, my OS X 10.9.5 reports:
>>>
>>> ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
>>>
>>> While I believe ruby 2.2 is still in preview:
>>>
>>>
>>> https://www.ruby-lang.org/en/news/2014/09/18/ruby-2-2-0-preview1-released/
>>>
>>> Kylo
>>>
>>>
>>>
 and Amazon AWS Linux.. Not sure what other flavors of Unix come with
 this by default. But based on that alone maybe it's time? Maybe look into
 what other new distros are on 2.2?  I know you guys are busy, but as we all
 know, you can't stop the wheels of time from grinding forward! ;)

 Thanks
 Tim


 On Tue, Oct 7, 2014 at 12:14 PM, Kylo Ginsberg 
 wrote:

> On Tue, Oct 7, 2014 at 7:26 AM, Tim Dunphy 
> wrote:
>
>> Hey guys,
>>
>>  I kept getting this annoying warning in the output of my puppet runs:
>>
>>
>> Warning: The package type's allow_virtual parameter will be changing
>> its
>> default value from false to true in a future release. If you do not
>> want to
>> allow virtual packages, please explicitly set allow_virtual to false.
>> (at /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:816:in `set_default')
>>
>>
>> So I found this article:
>>
>> https://inuits.eu/blog/puppet-361-depreciation-warning
>>
>> That suggesting putting this value in your site.pp for your
>> environment:
>>
>> Package {
>>   allow_virtual => true,
>> }
>>
>> Which DOES suppress that annoying output on the majority of the
>> hosts. But a few of them have ruby 2.2 installed on some of the newer 
>> OSs.
>>
>> And all the hosts with the newer ruby throw the following error
>> instead of performing clean puppet runs like the hosts with the older
>> rubies (1.8.7 and 1.9.3).
>>
>
> What's the 2.2 error?
>
> Also FYI we're doing zero testing with ruby 2.2 at this time.
>
> Kylo
>
>
>>
>> And I notice that I can't get puppet to work on the ruby 2.2 hosts
>> even after deleting that allow_virtual override from my site.pp.
>>
>> So how do I fix the nodes with the newer ruby? Is there any value I
>> can set that will make that annoying error message go away, yet allow the
>> puppet server to play nicely with all the nodes?
>>
>> --
> Kylo Ginsberg | k...@puppetlabs.com | irc: kylo | twitter: @kylog
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To u

[Puppet Users] Re: centos 7 boxes on vagrant cloud?

2014-10-08 Thread Scott Schneider

>
> I was wondering when there will be official centos 7 boxes from puppet 
> labs on https://vagrantcloud.com/puppetlabs?
>
> Also it would be nice to have a link on the puppet vagrant cloud homepage 
> to what repo these boxes are generated from like the chef project does to 
> https://github.com/opscode/bento.
>

Hi Chris,

You've caught us in the middle of re-working our automated Vagrant imaging 
pipeline.  I expect to have new builds published to Vagrant Cloud later 
this week or early next week.

We're also working on setting up a ticketing project for bug reporting and 
publicizing our Packer repository, as suggested.  Stay tuned!

-- 
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/88708797-d41e-458c-81b4-2c5f55d311cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: how to execute paths in a text file in puppet ruby

2014-10-08 Thread Corey Osman
Yea looks like the Facter readlines method doesn't exist.

http://ruby-doc.org/core-1.8.7/IO.html#method-c-readlines

You will need to use ruby's readlines and probably clean up the lines as 
well with chop.

Revised edition:  (untested, and probably full of syntax errors)

Facter.add(:java_versions1) do
 setcode do
file = '/home/suppalapati/java.txt'
if File.exists?('/home/suppalapati/java.txt')
   lines = File.readlines( file, "\n")
   if ! lines.nil?
 versions = lines.collect {|command| `#{command.chop}`}
   else
 versions = `java -version`.to_a
  end
  versions.join(",")
   else
 # poor mans debugger
 versions = "Can't find file: #{file}"
end
   
 end
end

Please read : https://docs.puppetlabs.com/facter/1.7/custom_facts.html

See section about loading custom facts. This will give you the chance to 
test on your machine.  

check syntax ruby -c  
On Wednesday, October 8, 2014 12:33:55 PM UTC-7, Spriya wrote:
>
> Hi,
>
> I used the same command which you provided me
>
> Here is the code:
>
> Facter.add(:java_versions1) do
>  setcode do
> log = Facter::Util::FileRead.readlines( 
> '/home/suppalapati/java.txt')
> if ! log.nil?
>versions = log.collect {|command| `#{command}`}
> else
>versions = `java -version`.to_a
> end
> versions.join(",")
>  end
> end
>
>
> Here is my txt file
> /usr/java/jre1.7.0_51/bin/java
> /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
>
> /opt/CLM-Web-Tools/im/linux.gtk.x86_64/jre_6.0.0.sr9_20110208_03/jre/bin/java
> /opt/CLM-Web-Tools/im/linux.gtk.x86/jre_6.0.0.sr9_20110208_03/jre/bin/java
> /opt/IBM/TeamConcertBuild/jre/bin/java
> /opt/IBM/InstallationManager/eclipse/jre_6.0.0.sr9_20110208_03/jre/bin/java
>
> /opt/IBM/InstallationManager_old/InstallationManager_old/eclipse/jre_6.0.0.sr9_20110208_03/jre/bin/java
> /opt/IBM/TeamConcertBuild_old/jre/bin/java
> /opt/itm/v6.2.2/JRE/lx8266/bin/java
> /var/lib/alternatives/java
> /u01/app/oracle/product/jdk1.7.0_25/jre/bin/java
> /u01/app/oracle/product/jdk1.7.0_25/bin/java
>
> The fact is not returning anything.
>
> Let me know
>
> On Wednesday, October 8, 2014 3:22:22 PM UTC-4, Corey Osman wrote:
>>
>>
>>
>> *I would probably do something like this where we store all the java 
>> versions in a comma separated string.Although if using facter >= 2.0 you 
>> can probably remove the join statement and store as an array.I also want to 
>> point out that java -version returns about 3 lines of text which may not be 
>> desirable. I am also not sure if Facter has a readlines  method (guessing 
>> it does), so you might have to swap out with ruby's file reading code.*
>>
>> Facter.add(:java_versions) do
>>  setcode do
>> log = 
>> Facter::Util::FileRead.readlines( '/home/weblogic/java.txt')
>>
>> *if ! log.nil?   versions = log.collect {|command| 
>> `#{command}`}else   versions = `java -version`.to_a*
>> *end versions.join(",") end*
>> end
>>
>>
>> Corey
>>
>> On Tuesday, October 7, 2014 10:31:12 AM UTC-7, Spriya wrote:
>>>
>>> Hi,
>>>
>>> I have a text file where i get all the java version.
>>>
>>> *cat java.txt*
>>> */usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java -version*
>>> */usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java -version*
>>> */opt/oracle/agent12c/core/12.1.0.4.0/jdk/bin/java -version*
>>> */opt/oracle/agent12c/core/12.1.0.4.0/jdk/jre/bin/java -version*
>>> */var/lib/alternatives/java -version*
>>> */u01/java/jdk1.7.0_65/jre/bin/java -version*
>>> */u01/java/jdk1.7.0_65/bin/java -version*
>>>
>>>
>>> Now i want to run commands in each line and place it in facts.
>>>
>>> How can i do that.
>>>
>>> I have just started doing the code*.*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *logfile = '/home/weblogic/java.txt'line_num=0log = 
>>> Facter::Util::FileRead.read(logfile)unless log.nil?  log.each_line do 
>>> |line|  output =  Facter::Util::Resoloution.execHow can i can continue 
>>> thatPlease help me*
>>>
>>

-- 
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/cdb1ce6b-7e38-4c19-887e-66fc6a34db8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs-corosync: cs_property doesn't get set

2014-10-08 Thread ge...@riseup.net
[I'm quite new to puppet, so not sure if this is an appropriate question
for this list.]

Hi all,

I'm running Debian wheezy, puppet version 2.7.23. I wanted to have a
look at the corosync module provided by puppetlabs [1].

My code for the test looks quite simple:

class { 'corosync':
enable_secauth => true,
authkey => '/var/lib/puppet/ssl/certs/ca.pem',
bind_address => $ipaddress_eth0,
multicast_address => '239.1.1.2',
}

corosync::service { 'pacemaker':
version => '0',
notify => Service['corosync'],
}

include corosync::reprobe

cs_property { 'stonith-enabled': value => 'false', }
cs_property { 'no-quorum-policy': value => 'ignore', }
cs_property { 'default-resource-stickiness': value => '100', }

After the agent run, corosync and pacemaker gets installed, and the
cluster gets set up. However, despite values for cs_property being set
(incorrect?), these values aren't being recognized, which leads to
ressources being unuseable. The cluster reports:

crm_verify -LV
crm_verify[12971]: 2014/10/08_22:53:36 WARN: cluster_status: We do not
have quorum - fencing and resource management disabled
crm_verify[12971]: 2014/10/08_22:53:36 ERROR: unpack_resources: Resource
start-up disabled since no STONITH resources have been defined
crm_verify[12971]: 2014/10/08_22:53:36 ERROR: unpack_resources: Either
configure some or disable STONITH with the stonith-enabled option
crm_verify[12971]: 2014/10/08_22:53:36 ERROR: unpack_resources: NOTE:
Clusters with shared data need STONITH to ensure data integrity
Errors found during check: config not valid

I thought that the agent has maybe to run twice, which didn't lead to
success however.

I'm quite clueless and appreciate any help!

Thanks,
Georg


[1] https://forge.puppetlabs.com/puppetlabs/corosync


signature.asc
Description: Digital signature


Re: [Puppet Users] Re: Puppet Error

2014-10-08 Thread Stephen Marlow
It appears to be interpreting params::sshd_service as a literal. Have you
tried prefixing it with a $ or fully qualifying it, e.g. $
puppet-ssh::params::sshd_service?

On Wed, Oct 8, 2014 at 3:20 PM, Juan Andres Ramirez 
wrote:

> Maybe??
>
> service { 'sshd':
>   ensure=> running,
>   enable=> true,
>   subscribe => File['/etc/ssh/sshd_config'],
> }
>
>
>
> On Wednesday, October 8, 2014 3:38:13 PM UTC-3, MASS wrote:
>>
>> I'm getting the following error when I run this Puppet ssh code on
>> Freebsd.  Note, the code runs fine on Linux.  Any ideas?
>>
>> Debug: Service[params::sshd_service](provider=freebsd): Could not find
>> params::sshd_service in /etc/rc.d
>> Debug: Service[params::sshd_service](provider=freebsd): Could not find
>> params::sshd_service in /usr/local/etc/rc.d
>> Debug: Service[params::sshd_service](provider=freebsd): Could not find
>> params::sshd_service.sh in /etc/rc.d
>> Debug: Service[params::sshd_service](provider=freebsd): Could not find
>> params::sshd_service.sh in /usr/local/etc/rc.d
>> Error: /Stage[main]/Puppet-ssh::Service/Service[params::sshd_service]:
>> Could not evaluate: Could not find init script for 'params::sshd_service'
>> Debug: /Schedule[puppet]: Skipping device resources because running on a
>> host
>> Stage[main]: Would have triggered 'refresh' from 1 events
>>
>>
>> Here are some snippets from the module...
>>
>> # Class: puppet-ssh::params
>> class puppet-ssh::params {
>>   $sshd_config= '/etc/ssh/sshd_config'
>>   $ssh_config = '/etc/ssh/ssh_config'
>>   $sshd_service   = 'sshd'
>> }
>>
>>
>> # Class: puppet-ssh::service
>> class puppet-ssh::service {
>>   case $::operatingsystem {
>> redhat: {
>>   service { params::sshd_service:
>> ensure => 'running',
>> enable => true,
>>   }
>> }
>> freebsd: {
>>   service { params::sshd_service:
>> ensure => 'running',
>> enable => true,
>>   }
>> }
>> aix: {
>>   service { params::sshd_service:
>> ensure => 'running',
>> enable => true,
>>   }
>> }
>> default: {
>>   fail("The SSH module could not find '${::operatingsystem}'
>> parameters.")
>> }
>>   }
>> }
>>
>  --
> 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/4bf95c2c-4755-4e8b-8a8c-66a57c4af290%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/CALGSqjLoYyJ13DXheWMZ4Qz1Y%2Bu9Jw_%2BtONytCqF7EVySvnWZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: EXEC resource fails but does not log a failure

2014-10-08 Thread Paul Chernoch
Thank you for your advice. While researching the problem with a colleague, 
we discovered the root cause:

TF.EXE HISTORY returns an ERRORLEVEL of 0 (meaning success) in one narrow 
case when it should not.

Case 1: Running user is Authorized for TFS, no login credentials on command 
line. Success 0. CORRECT.
Case 2: Running user is Authorized for TFS, good login credentials on 
command line. Success 0. CORRECT.
Case 3: Running user is Authorized for TFS, bad login credentials on 
command line. Error 1. CORRECT.
Case 4: Running user is NOT Authorized for TFS, no login credentials on 
command line. Success 0. INCORRECT.
Case 5: Running user is NOT Authorized for TFS, good login credentials on 
command line. Success 0. CORRECT.
Case 6: Running user is NOT Authorized for TFS, bad login credentials on 
command line. Error 1. CORRECT.

So only case 4 produces incorrect results.
Strangely, the TF VIEW command, which actually fetches a file from TFS, 
handles all the cases properly.

Paul

On Tuesday, October 7, 2014 12:15:23 PM UTC-4, Paul Chernoch wrote:
>
> I have an EXEC command that has an onlyif condition. When I have my puppet 
> service running as the correct user account, all goes well.
> When the puppet agent is running under an inadequately privileged account, 
> some operations fail silently.
>
> During a maintenance action, another staff member tried to upgrade the 
> puppet agent. 
> When that didn't work with our version of enterprise, he reinstalled 
> puppet, but forgot to change the service accounts to be our special puppet 
> user.
> That puppet user has access to Team Foundation Server while the default 
> account (NT System) does not.
> I expected that puppet enterprise would show error messages in the log and 
> show agent runs as failing.
> IT DID NOT.
>
> To diagnose the problem, I started a special shell using "Psexec.exe -i -s 
> cmd.exe". This sysinternals tool allows me to impersonate "nt 
> authority\system".
> While running under that account, I verified that my EXEC command and the 
> accompanying "onlyif" command each fail with error code 1.
> The EXEC command being run is "TF.EXE" with the "VIEW" option, the Team 
> Foundation Server command line executable.
> The onlyif command is a shell call to "ruby.exe" which executes a rub 
> script that also calls TF.EXE, this time with the "HISTORY" option.
> The basic idea is that I call TF HISTORY to see if there is a newer file 
> than the one I have extracted. If there is, then I return one value to 
> indicate that EXEC should do its job.
> If there is no newer file then I return a code that indicates no changes 
> occurred and EXEC should not perform its action.
> If TF.EXE returns an error code in the onlyif command, I decided to tell 
> EXEC that it shoudl try to get the file whether it needs to or not.
>
> Running both TF VIEW and RUBY (which calls TF HISTORY) in the special 
> shell with the wrong user yields return codes of "1".
> This should mean the the EXEC failed, but it does not log failure.
>
> What should I do?
>
> Here is a fragment of my puppet code:
>
>
>   exec { "tf view ${filename} /version:${versionspec}":
> command   => $tfview_cmd,
> path  => $exec_path,
> cwd   => $tf_dir_unix,
> onlyif=> $tfhistory_cmd,
> returns   => ["0"],
> logoutput => true,
> require   => Class['tfview::tfcomponents']
>   } 
>
> I am running agents on Windows 2008R2.
>
> Paul
>
>

-- 
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/493d455a-eb1a-4af0-80f6-1c742ccb99f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: how to execute paths in a text file in puppet ruby

2014-10-08 Thread Spriya
Hi,

I used the same command which you provided me

Here is the code:

Facter.add(:java_versions1) do
 setcode do
log = Facter::Util::FileRead.readlines( 
'/home/suppalapati/java.txt')
if ! log.nil?
   versions = log.collect {|command| `#{command}`}
else
   versions = `java -version`.to_a
end
versions.join(",")
 end
end


Here is my txt file
/usr/java/jre1.7.0_51/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java
/opt/CLM-Web-Tools/im/linux.gtk.x86_64/jre_6.0.0.sr9_20110208_03/jre/bin/java
/opt/CLM-Web-Tools/im/linux.gtk.x86/jre_6.0.0.sr9_20110208_03/jre/bin/java
/opt/IBM/TeamConcertBuild/jre/bin/java
/opt/IBM/InstallationManager/eclipse/jre_6.0.0.sr9_20110208_03/jre/bin/java
/opt/IBM/InstallationManager_old/InstallationManager_old/eclipse/jre_6.0.0.sr9_20110208_03/jre/bin/java
/opt/IBM/TeamConcertBuild_old/jre/bin/java
/opt/itm/v6.2.2/JRE/lx8266/bin/java
/var/lib/alternatives/java
/u01/app/oracle/product/jdk1.7.0_25/jre/bin/java
/u01/app/oracle/product/jdk1.7.0_25/bin/java

The fact is not returning anything.

Let me know

On Wednesday, October 8, 2014 3:22:22 PM UTC-4, Corey Osman wrote:
>
>
>
> *I would probably do something like this where we store all the java 
> versions in a comma separated string.Although if using facter >= 2.0 you 
> can probably remove the join statement and store as an array.I also want to 
> point out that java -version returns about 3 lines of text which may not be 
> desirable. I am also not sure if Facter has a readlines  method (guessing 
> it does), so you might have to swap out with ruby's file reading code.*
>
> Facter.add(:java_versions) do
>  setcode do
> log = Facter::Util::FileRead.readlines( '/home/weblogic/java.txt')
>
> *if ! log.nil?   versions = log.collect {|command| 
> `#{command}`}else   versions = `java -version`.to_a*
> *end versions.join(",") end*
> end
>
>
> Corey
>
> On Tuesday, October 7, 2014 10:31:12 AM UTC-7, Spriya wrote:
>>
>> Hi,
>>
>> I have a text file where i get all the java version.
>>
>> *cat java.txt*
>> */usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java -version*
>> */usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java -version*
>> */opt/oracle/agent12c/core/12.1.0.4.0/jdk/bin/java -version*
>> */opt/oracle/agent12c/core/12.1.0.4.0/jdk/jre/bin/java -version*
>> */var/lib/alternatives/java -version*
>> */u01/java/jdk1.7.0_65/jre/bin/java -version*
>> */u01/java/jdk1.7.0_65/bin/java -version*
>>
>>
>> Now i want to run commands in each line and place it in facts.
>>
>> How can i do that.
>>
>> I have just started doing the code*.*
>>
>>
>>
>>
>>
>>
>>
>> *logfile = '/home/weblogic/java.txt'line_num=0log = 
>> Facter::Util::FileRead.read(logfile)unless log.nil?  log.each_line do 
>> |line|  output =  Facter::Util::Resoloution.execHow can i can continue 
>> thatPlease help me*
>>
>

-- 
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/59b77e7b-27c2-4586-a953-d9bdd8d8c71f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: how to execute paths in a text file in puppet ruby

2014-10-08 Thread Corey Osman



*I would probably do something like this where we store all the java 
versions in a comma separated string.Although if using facter >= 2.0 you 
can probably remove the join statement and store as an array.I also want to 
point out that java -version returns about 3 lines of text which may not be 
desirable. I am also not sure if Facter has a readlines  method (guessing 
it does), so you might have to swap out with ruby's file reading code.*

Facter.add(:java_versions) do
 setcode do
log = Facter::Util::FileRead.readlines( '/home/weblogic/java.txt')

*if ! log.nil?   versions = log.collect {|command| 
`#{command}`}else   versions = `java -version`.to_a*
*end versions.join(",") end*
end


Corey

On Tuesday, October 7, 2014 10:31:12 AM UTC-7, Spriya wrote:
>
> Hi,
>
> I have a text file where i get all the java version.
>
> *cat java.txt*
> */usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java -version*
> */usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java -version*
> */opt/oracle/agent12c/core/12.1.0.4.0/jdk/bin/java -version*
> */opt/oracle/agent12c/core/12.1.0.4.0/jdk/jre/bin/java -version*
> */var/lib/alternatives/java -version*
> */u01/java/jdk1.7.0_65/jre/bin/java -version*
> */u01/java/jdk1.7.0_65/bin/java -version*
>
>
> Now i want to run commands in each line and place it in facts.
>
> How can i do that.
>
> I have just started doing the code*.*
>
>
>
>
>
>
>
> *logfile = '/home/weblogic/java.txt'line_num=0log = 
> Facter::Util::FileRead.read(logfile)unless log.nil?  log.each_line do 
> |line|  output =  Facter::Util::Resoloution.execHow can i can continue 
> thatPlease help me*
>

-- 
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/05330e16-7286-42a6-a94c-b595c028659c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Error

2014-10-08 Thread Juan Andres Ramirez
Maybe??

service { 'sshd':
  ensure=> running,
  enable=> true,
  subscribe => File['/etc/ssh/sshd_config'],
}



On Wednesday, October 8, 2014 3:38:13 PM UTC-3, MASS wrote:
>
> I'm getting the following error when I run this Puppet ssh code on 
> Freebsd.  Note, the code runs fine on Linux.  Any ideas?  
>
> Debug: Service[params::sshd_service](provider=freebsd): Could not find 
> params::sshd_service in /etc/rc.d
> Debug: Service[params::sshd_service](provider=freebsd): Could not find 
> params::sshd_service in /usr/local/etc/rc.d
> Debug: Service[params::sshd_service](provider=freebsd): Could not find 
> params::sshd_service.sh in /etc/rc.d
> Debug: Service[params::sshd_service](provider=freebsd): Could not find 
> params::sshd_service.sh in /usr/local/etc/rc.d
> Error: /Stage[main]/Puppet-ssh::Service/Service[params::sshd_service]: 
> Could not evaluate: Could not find init script for 'params::sshd_service'
> Debug: /Schedule[puppet]: Skipping device resources because running on a 
> host
> Stage[main]: Would have triggered 'refresh' from 1 events
>
>
> Here are some snippets from the module...
>
> # Class: puppet-ssh::params
> class puppet-ssh::params {
>   $sshd_config= '/etc/ssh/sshd_config'
>   $ssh_config = '/etc/ssh/ssh_config'
>   $sshd_service   = 'sshd'
> }
>
>
> # Class: puppet-ssh::service
> class puppet-ssh::service {
>   case $::operatingsystem {
> redhat: {
>   service { params::sshd_service:
> ensure => 'running',
> enable => true,
>   }
> }
> freebsd: {
>   service { params::sshd_service:
> ensure => 'running',
> enable => true,
>   }
> }
> aix: {
>   service { params::sshd_service:
> ensure => 'running',
> enable => true,
>   }
> }
> default: {
>   fail("The SSH module could not find '${::operatingsystem}' 
> parameters.")
> }
>   }
> }
>

-- 
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/4bf95c2c-4755-4e8b-8a8c-66a57c4af290%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: stdlib keys()

2014-10-08 Thread Juan Andres Ramirez
Thank you very much Felix for you replay.
I got it now , but I have an other question:

I created file findarray.pp with this code inside:
define findarray(
   $sitearray = $title,
   $siteName
){
  notify{"ARRAY DEL SITIO - ${sitearray}":}
}

and call findarray from init.pp, with next code:
$site_array = hiera("host_key")
$prueba = keys($site_array)

findarray{$prueba:
   siteName => $siteName
}

this code return only ARRAY DEL SITIO - server1 and ARRAY DEL SITIO - 
server2.
How to get all data from hiera, why only get server1 and server2 and no 
other data?.

Thanks!!!



On Monday, October 6, 2014 3:29:22 PM UTC-3, Juan Andres Ramirez wrote:
>
> Hello guys, 
>   I have the next problem to get value of keys from 
> hieradata(common.yaml)
>
> 1- I have common.yaml :
>
> host_key:
>   - server1:
> alias: webserver
> ipadress: "192.168.0.4"
> port : "80"
>   - server2:
> alias: dbserver
> ipadress: "192.168.0.5"
> port : "80"
>   
> 2) init.pp
>
> Include stdlib
>
> $alldata = hiera_array("host_key")
>
> #look arrays:
> notify{"SEE THE ARRAYS: ${sitedefinition}":}
> #output:
>
> port80aliaswebserveripadress192.168.0.4server1port80aliasdbserveripadress192.168.0.5server2none
>
> My question is how can I get the data to server1 or server2? I know this 
> can work with Keys() but I dont know how.
>
> 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/3e11fdc5-fa2a-4985-9453-b3b55f3e766f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Need help with simple hiera example

2014-10-08 Thread Corey Osman
Seems like  your clientcert is different during the puppet run than the 
command line since your explicitly passing in the clientcert.  I would 
change clientcert in your hiera config to fqdn.  You are not guaranteed to 
have a client cert, but all hosts will have a fqdn.  You can also use the 
hiera function in your puppet code so it makes that "automatic" lookup 
easier to understand since you control the lookup key.  Although, I don't 
recommend this since automated lookups are preferred as two lookups would 
actually occur if myfoo::bar doesn't exist.   If you run your puppet master 
in debug mode, it will actually detail when it can't find a lookup key, so 
have a look at the logs.

- hosts/%{fqdn}


ie. 

class foo(
$bar = hiera('myfoo::bar', 'defaultvalue')
# if the hiera function I specified as the default value for foo 
returns nil, the puppet automated lookup will occur and use 'foo::bar' 
lookup key
}

Hiera is pretty easy once you know the rules and I bet that your puppet 
agent clientcert must be different than what you have in your hiera 
datastore.





On Wednesday, October 8, 2014 6:44:56 AM UTC-7, Stack Kororā wrote:
>
> Greetings, 
>
>  I don't know why, but I am having a rough time trying to get hiera to 
> work. It seems to me that all the examples I see online are either absurdly 
> complex or so stupidly simple that they are absolutely useless. Either way 
> I have found the documentation for hiera completely lacking (it doesn't 
> help that there is a lot of bad information pertaining old puppet releases 
> that is no longer the correct way to do things...at least according to 
> other sources which may or may not be the correct way either...bleck...). 
> Of all the documentation/blogs/examples/ect I have been pouring over the 
> last 2 hours, not one has given me a useful hint at getting this working. 
>
>
>  *deep breath in an attempt to control my frustration so I can 
> communicate on a somewhat intelligent level* 
>
> Whew... 
>
>  OK. Lets start. 
>
>
>  $ puppet -V 
>
> 3.7.1 
>
> $ hiera -V 
>
> 1.3.4 
>
> $ hostname 
>
> puppet.test.vm 
>
> $ sudo puppet cert list --all 
>
> + "puppet.test.vm"  
>
>
>  This is as simple as I can make it. 
>
>
>  $ cd /etc/puppet 
>
> $ find . -type f 
>
> ./modules/testhiera/manifests/init.pp 
>
> ./manifests/site.pp 
>
> ./puppet.conf <- did not touch after test vm install 
>
> ./auth.conf <- did not touch after test vm install 
>
> $ cat manifests/site.pp 
>
> node 'puppet.test.vm' { 
>
> class { 'testhiera': } 
>
> } 
>
> $ cat modules/testhiera/manifests/init.pp 
>
> class testhiera ( $test="blah") { 
>
> file { "/tmp/$test" : ensure => present} 
>
> } 
>
> $ puppet agent -t 
>
> Info: Retrieving pluginfacts 
>
> Info: Retrieving plugin 
>
> Info: Caching catalog for puppet.test.vm 
>
> Info: Applying configuration version '1412771807' 
>
> Notice: /Stage[main]/Testhiera/File[/tmp/blah]/ensure: created 
>
> Notice: Finished catalog run in 0.04 seconds 
>
> $ rm /tmp/blah 
>
>   
> Hooray! That works. Can't get much simpler then that, right? OK, lets add 
> in hiera. Should be simple right? Ha!
>
>  
> $ sudo ln -s /etc/puppet/hiera.yaml /etc/hiera.yaml 
>
> $ find . -type f 
>
> ./hiera.yaml 
>
> ./hosts/puppet.test.vm.yaml 
>
> ./modules/testhiera/manifests/init.pp 
>
> ./manifests/site.pp 
>
> ./puppet.conf 
>
> ./auth.conf 
>
> # Only added these two files below; made no other changes 
>
> $ cat hiera.yaml 
>
> --- 
>
> :hierarchy: 
>
> - hosts/%{clientcert} 
>
> :backends: 
>
> - yaml 
>
> :yaml: 
>
> :datadir: '/etc/puppet/' 
>
> $ cat hosts/puppet.test.vm.yaml 
>
> --- 
>
> hieratest::test: yadda 
>
> $ hiera hieratest::test clientcert=puppet.test.vm 
>
> yadda 
>
> # Hiera on the command line works. I must be making progress!!
>
>
> $ sudo puppet agent -t 
>
> Info: Retrieving pluginfacts 
>
> Info: Retrieving plugin 
>
> Info: Caching catalog for puppet.test.vm 
>
> Info: Applying configuration version '1412771807' 
>
> Notice: /Stage[main]/Testhiera/File[/tmp/blah]/ensure: created 
>
> Notice: Finished catalog run in 0.03 seconds 
>
>  
> What??? That is absolutely contrary to the documentation! It should have 
> created /tmp/yadda! I am looking at the official docs right now on using a 
> hiera variable with a default variable and I don't see how my example is 
> any different in the slightest! Blah should have only been used as a 
> default if the host wasn't found. Clearly either puppet can't find hiera 
> and used default, or it simply ignored the hiera data. 
>
>
>   Fine. We will take out the default blah and force it to use something 
> from hiera. 
>
>
> $ rm /tmp/blah 
>
> $ cat modules/testhiera/manifests/init.pp 
>
> class testhiera ( ) { 
>
> file { "/tmp/$test" : ensure => present} 
>
> } 
>
> $ sudo puppet agent -t 
>
> Info: Retrieving pluginfacts 
>
> Info: Retrieving plugin 
>
> Info: Caching catalog for puppet.test.vm 
>
> Info: Applying configuration version '1412773578' 
>
> Notice: Finished catalog 

[Puppet Users] how to write each java version to individual facts

2014-10-08 Thread Spriya
Hi All,

I am trying to get all the java versions and paths where it is located. I 
got all java_paths in a fact called java_path. Now i need those versions in 
each custom facts.

I wrote a code but this not executing .

Please help me

*require 'rexml/document'*
*require 'facter'*

*Facter.add("java_path") do*
*  setcode do*
*Facter::Util::Resolution.exec('/home/suppalapati/java.sh')*
*end*
*end*




*logfile = '/home/suppalapati/java.txt'*

*line_num=0*

*log = Facter::Util::FileRead.read(logfile)*
*unless log.nil?*
*  log.each_line do |line|*
*if line.include?('java')*
*   line_num += 1*
*   javaid, val =  %x[ #{log} ]*
*Facter.add("java_#{javaid}") do*
*  setcode do*
* val*
*end*
*   end*
* end*
*   end*

* Facter.add("java_version_count") do*
*  setcode do*
*line_num*
*  end*
* end*
*end*


Here is my java.txt file

*/usr/java/jre1.7.0_51/bin/java*
*/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java*
*/opt/CLM-Web-Tools/im/linux.gtk.x86_64/jre_6.0.0.sr9_20110208_03/jre/bin/java*
*/opt/CLM-Web-Tools/im/linux.gtk.x86/jre_6.0.0.sr9_20110208_03/jre/bin/java*
*/opt/IBM/TeamConcertBuild/jre/bin/java*
*/opt/IBM/InstallationManager/eclipse/jre_6.0.0.sr9_20110208_03/jre/bin/java*
*/opt/IBM/InstallationManager_old/InstallationManager_old/eclipse/jre_6.0.0.sr9_20110208_03/jre/bin/java*
*/opt/IBM/TeamConcertBuild_old/jre/bin/java*
*/opt/itm/v6.2.2/JRE/lx8266/bin/java*
*/var/lib/alternatives/java*
*/u01/app/oracle/product/jdk1.7.0_25/jre/bin/java*
*/u01/app/oracle/product/jdk1.7.0_25/bin/java*


*Please help me*

-- 
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/c09b4d3a-fab9-47fd-a820-7b754f43db9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Error

2014-10-08 Thread MASS
I'm getting the following error when I run this Puppet ssh code on Freebsd. 
 Note, the code runs fine on Linux.  Any ideas?  

Debug: Service[params::sshd_service](provider=freebsd): Could not find 
params::sshd_service in /etc/rc.d
Debug: Service[params::sshd_service](provider=freebsd): Could not find 
params::sshd_service in /usr/local/etc/rc.d
Debug: Service[params::sshd_service](provider=freebsd): Could not find 
params::sshd_service.sh in /etc/rc.d
Debug: Service[params::sshd_service](provider=freebsd): Could not find 
params::sshd_service.sh in /usr/local/etc/rc.d
Error: /Stage[main]/Puppet-ssh::Service/Service[params::sshd_service]: 
Could not evaluate: Could not find init script for 'params::sshd_service'
Debug: /Schedule[puppet]: Skipping device resources because running on a 
host
Stage[main]: Would have triggered 'refresh' from 1 events


Here are some snippets from the module...

# Class: puppet-ssh::params
class puppet-ssh::params {
  $sshd_config= '/etc/ssh/sshd_config'
  $ssh_config = '/etc/ssh/ssh_config'
  $sshd_service   = 'sshd'
}


# Class: puppet-ssh::service
class puppet-ssh::service {
  case $::operatingsystem {
redhat: {
  service { params::sshd_service:
ensure => 'running',
enable => true,
  }
}
freebsd: {
  service { params::sshd_service:
ensure => 'running',
enable => true,
  }
}
aix: {
  service { params::sshd_service:
ensure => 'running',
enable => true,
  }
}
default: {
  fail("The SSH module could not find '${::operatingsystem}' 
parameters.")
}
  }
}

-- 
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/6e6fc304-f721-462e-9970-f8c5be8a8874%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetboard unable to reach puppetb

2014-10-08 Thread Tim Dunphy
Hey all,

 I was able to setup puppetdb on my puppetmaster. I'm very happy I was able
to get that done.

And now that that's working I was hoping to get the puppetboard running.

But here's where I'm at so far:

http://puppetboard.jokefire.com/

I plan to put SSL and some basic auth on there once I get it working!

Here's what I'm seeing in the apache error logs:

[root@puppet:/etc/httpd/conf.d] #tail -f
/var/log/httpd/puppetboard_error_log
[Wed Oct 08 12:51:50 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/lists.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:21 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/css/puppetboard.css, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:21 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/moment.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:21 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/timestamps.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:21 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/tables.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:21 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/lists.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:22 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/moment.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:22 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/timestamps.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:22 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/tables.js, referer: http://puppetboard.jokefire.com/
[Wed Oct 08 12:52:22 2014] [crit] [client 173.213.212.233] configuration
error:  couldn't perform authentication. AuthType not set!:
/static/js/lists.js, referer: http://puppetboard.jokefire.com/

And here's what I'm getting in my apache access logs:

[root@puppet:/etc/httpd/conf.d] #tail -f
/var/log/httpd/puppetboard_access_log
173.213.212.233 - - [08/Oct/2014:12:52:21 -0400] "GET / HTTP/1.1" 500 1034
"-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101
Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:21 -0400] "GET
/static/css/puppetboard.css HTTP/1.1" 500 405 "
http://puppetboard.jokefire.com/"; "Mozilla/5.0 (Macintosh; Intel Mac OS X
10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:21 -0400] "GET /static/js/moment.js
HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/"; "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:21 -0400] "GET
/static/js/timestamps.js HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/";
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101
Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:21 -0400] "GET /static/js/tables.js
HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/"; "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:21 -0400] "GET /static/js/lists.js
HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/"; "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:22 -0400] "GET /static/js/moment.js
HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/"; "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:22 -0400] "GET
/static/js/timestamps.js HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/";
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101
Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:22 -0400] "GET /static/js/tables.js
HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/"; "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"
173.213.212.233 - - [08/Oct/2014:12:52:22 -0400] "GET /static/js/lists.js
HTTP/1.1" 500 405 "http://puppetboard.jokefire.com/"; "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0"


Here's my apache vhost setup:


ServerName puppetboard.jokefire.com
WSGIDaemonProcess puppetboard user=apache group=apache threads=5
WSGIScriptAlias / /var/www/puppetboard/wsgi.py
ErrorLog /var/log/httpd/puppetboard_error_log
CustomLog /var/log/httpd/puppetboard_access_log combined

Alias /static /usr/lib/python2.6/

Re: [Puppet Users] vmware-vcsa module !!!

2014-10-08 Thread Rakesh Kathpal
Nan.. Thanks a lot for your help.

On Wed, Oct 8, 2014 at 8:08 PM, Nan Liu  wrote:

> On Wed, Oct 8, 2014 at 1:49 AM, Rakesh Kathpal  wrote:
>
>> I have a esx host installed and a standalone centos server.
>>
>> what I am trying to do is via foreman
>>
>> - Setting up the module for centos server
>> - So that it can install vcsa on my esx server.
>>
>> I end up getting error as
>>
>> Info: Applying configuration version '1412754558'
>> Debug: PuppetX::Puppetlabs::Transport::Ssh initializing connection to:
>> 192.168.1.26
>> Debug: Executing on 192.168.1.26:
>> vpxd_servicecfg eula read
>> Debug: Execution result:
>> sh: vpxd_servicecfg: not found
>>
>> Error: /Stage[main]/Vcsas/Vcsa[demo]/Vcsa_eula[demo]: Could not evaluate:
>> odd number of arguments for Hash
>> /var/lib/puppet/lib/puppet/provider/vcsa_eula/default.rb:15:in `[]'
>> /var/lib/puppet/lib/puppet/provider/vcsa_eula/default.rb:15:in `exists?'
>> /usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
>>
>>
>> Please node this is a vanilla esx server, do I need to do anything else
>> before applying the module..
>>
>
> The module is intended to run against a vcenter server appliance (5.0-5.5
> versions), not an ESX server. You will need to use ovftool or other means
> to import the appliance first. vpxd_servicecfg is a command that should be
> available on the vcenter appliance. There's also an outstanding issue with
> 5.5 related to a sshd setting, there's more info here:
> https://github.com/vmware/vmware-vcsa/issues/19
>
> HTH,
>
> Nan
>
> --
> 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/CACqVBqDpgMBpGO3dn2Vg8ER%2B_rfPu6ZiFLwa2J3ZnuO60XxvjA%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/CAEJrXMX8ejR1pZf_PA2jLBMak-N2zOZnY7TXUupPRz2qdOrCxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] vmware-vcsa module !!!

2014-10-08 Thread Nan Liu
On Wed, Oct 8, 2014 at 1:49 AM, Rakesh Kathpal  wrote:

> I have a esx host installed and a standalone centos server.
>
> what I am trying to do is via foreman
>
> - Setting up the module for centos server
> - So that it can install vcsa on my esx server.
>
> I end up getting error as
>
> Info: Applying configuration version '1412754558'
> Debug: PuppetX::Puppetlabs::Transport::Ssh initializing connection to:
> 192.168.1.26
> Debug: Executing on 192.168.1.26:
> vpxd_servicecfg eula read
> Debug: Execution result:
> sh: vpxd_servicecfg: not found
>
> Error: /Stage[main]/Vcsas/Vcsa[demo]/Vcsa_eula[demo]: Could not evaluate:
> odd number of arguments for Hash
> /var/lib/puppet/lib/puppet/provider/vcsa_eula/default.rb:15:in `[]'
> /var/lib/puppet/lib/puppet/provider/vcsa_eula/default.rb:15:in `exists?'
> /usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'
>
>
> Please node this is a vanilla esx server, do I need to do anything else
> before applying the module..
>

The module is intended to run against a vcenter server appliance (5.0-5.5
versions), not an ESX server. You will need to use ovftool or other means
to import the appliance first. vpxd_servicecfg is a command that should be
available on the vcenter appliance. There's also an outstanding issue with
5.5 related to a sshd setting, there's more info here:
https://github.com/vmware/vmware-vcsa/issues/19

HTH,

Nan

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


[Puppet Users] Re: What is the difference between puppetlabs modules and example42 modules?

2014-10-08 Thread jcbollinger


On Tuesday, October 7, 2014 8:18:27 PM UTC-5, liux...@huawei.com wrote:
>
> I found that many modules are both in puppetlabs and example42 , so what 
> is the difference between puppetlabs and example42 , and how can I chose 
> which to use?
>

Same-named puppetlabs and example42 (and other) modules are *different 
modules* that (probably) manage the same subsystem.  They are implemented 
differently, they usually provide slightly different feature sets, they may 
have different structure, and they probably name things slightly 
differently.

Example42 modules are well regarded, and their author can sometimes be 
found around here.  Generally speaking, I would have no problem 
recommending them.

Puppetlabs modules are well regarded, and their authors can sometimes be 
found around here.  These modules are supported by PL itself, and generally 
speaking, I would have no problem recommending them.

As to how to choose between similar modules from different sources, you 
should examine their respective documentation to see whether they provide 
all the features you need, and to get an idea of how easily each can be 
applied to your particular situation.  You could even try both to see which 
fits better.  Be aware that choosing one of those for one module may 
obligate you to use other modules from the same source (to correctly 
satisfy module dependencies).  Strictly speaking, however, multiple sources 
are not necessarily mutually exclusive (for different modules).


John

-- 
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/d6a07a79-2dbc-4fa4-a03a-fb43f560e332%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Need help with simple hiera example

2014-10-08 Thread Stack Kororā
 

Greetings, 

 I don't know why, but I am having a rough time trying to get hiera to 
work. It seems to me that all the examples I see online are either absurdly 
complex or so stupidly simple that they are absolutely useless. Either way 
I have found the documentation for hiera completely lacking (it doesn't 
help that there is a lot of bad information pertaining old puppet releases 
that is no longer the correct way to do things...at least according to 
other sources which may or may not be the correct way either...bleck...). 
Of all the documentation/blogs/examples/ect I have been pouring over the 
last 2 hours, not one has given me a useful hint at getting this working. 


 *deep breath in an attempt to control my frustration so I can communicate 
on a somewhat intelligent level* 

Whew... 

 OK. Lets start. 


 $ puppet -V 

3.7.1 

$ hiera -V 

1.3.4 

$ hostname 

puppet.test.vm 

$ sudo puppet cert list --all 

+ "puppet.test.vm"  


 This is as simple as I can make it. 


 $ cd /etc/puppet 

$ find . -type f 

./modules/testhiera/manifests/init.pp 

./manifests/site.pp 

./puppet.conf <- did not touch after test vm install 

./auth.conf <- did not touch after test vm install 

$ cat manifests/site.pp 

node 'puppet.test.vm' { 

class { 'testhiera': } 

} 

$ cat modules/testhiera/manifests/init.pp 

class testhiera ( $test="blah") { 

file { "/tmp/$test" : ensure => present} 

} 

$ puppet agent -t 

Info: Retrieving pluginfacts 

Info: Retrieving plugin 

Info: Caching catalog for puppet.test.vm 

Info: Applying configuration version '1412771807' 

Notice: /Stage[main]/Testhiera/File[/tmp/blah]/ensure: created 

Notice: Finished catalog run in 0.04 seconds 

$ rm /tmp/blah 

  
Hooray! That works. Can't get much simpler then that, right? OK, lets add 
in hiera. Should be simple right? Ha!

 
$ sudo ln -s /etc/puppet/hiera.yaml /etc/hiera.yaml 

$ find . -type f 

./hiera.yaml 

./hosts/puppet.test.vm.yaml 

./modules/testhiera/manifests/init.pp 

./manifests/site.pp 

./puppet.conf 

./auth.conf 

# Only added these two files below; made no other changes 

$ cat hiera.yaml 

--- 

:hierarchy: 

- hosts/%{clientcert} 

:backends: 

- yaml 

:yaml: 

:datadir: '/etc/puppet/' 

$ cat hosts/puppet.test.vm.yaml 

--- 

hieratest::test: yadda 

$ hiera hieratest::test clientcert=puppet.test.vm 

yadda 

# Hiera on the command line works. I must be making progress!!


$ sudo puppet agent -t 

Info: Retrieving pluginfacts 

Info: Retrieving plugin 

Info: Caching catalog for puppet.test.vm 

Info: Applying configuration version '1412771807' 

Notice: /Stage[main]/Testhiera/File[/tmp/blah]/ensure: created 

Notice: Finished catalog run in 0.03 seconds 

 
What??? That is absolutely contrary to the documentation! It should have 
created /tmp/yadda! I am looking at the official docs right now on using a 
hiera variable with a default variable and I don't see how my example is 
any different in the slightest! Blah should have only been used as a 
default if the host wasn't found. Clearly either puppet can't find hiera 
and used default, or it simply ignored the hiera data. 


  Fine. We will take out the default blah and force it to use something 
from hiera. 


$ rm /tmp/blah 

$ cat modules/testhiera/manifests/init.pp 

class testhiera ( ) { 

file { "/tmp/$test" : ensure => present} 

} 

$ sudo puppet agent -t 

Info: Retrieving pluginfacts 

Info: Retrieving plugin 

Info: Caching catalog for puppet.test.vm 

Info: Applying configuration version '1412773578' 

Notice: Finished catalog run in 0.04 seconds 

 
What? No blah, no yadda, nothing! I don't even get an error!! 

 
OK. OK. Fine. Maybe it doesn't like something in hiera. I will give hiera a 
default. 


$ find . -type f 

./hiera.yaml 

./modules/testhiera/manifests/init.pp 

./puppet.conf 

./hosts/common.yaml 

./hosts/puppet.test.vm.yaml 

./auth.conf 

./manifests/site.pp 

$ cat hiera.yaml 

--- 

:hierarchy: 

- hosts/%{clientcert} 

- hosts/common 

:backends: 

- yaml 

:yaml: 

:datadir: '/etc/puppet/' 

$ cat hosts/common.yaml 

--- 

hieratest::test: blarg 

$ hiera hieratest::test clientcert=puppet.test.vm 

yadda 

$ hiera hieratest::test clientcert=some.thing.else 

blarg 

 
Yeah...alright...hiera on the command line is giving me exactly what I 
want. I have feeling good about this one... 


$ sudo puppet agent -t 

Info: Retrieving pluginfacts 

Info: Retrieving plugin 

Info: Caching catalog for puppet.test.vm 

Info: Applying configuration version '1412773578' 

Notice: Finished catalog run in 0.06 seconds 

$ ls /tmp/blah /tmp/yadda /tmp/blarg 

ls: cannot access /tmp/blah: No such file or directory 

ls: cannot access /tmp/yadda: No such file or directory 

ls: cannot access /tmp/blarg: No such file or directory 

 
ACK What the hell?!?!! Nothing? Not even an error?? Even running –debug 
on that puppet run gives me jack-squat of information. There isn't anything 
in the puppet master logs either.

 
I have tried doing th

[Puppet Users] Re: New to puppet

2014-10-08 Thread jcbollinger


On Wednesday, October 8, 2014 1:15:29 AM UTC-5, Krishna Krishna wrote:
>
> Ok,
>
> I am newbie to puppet. So be nice. I may ask some stupid questions.
>
> I could not find some similar post so creating new post.
>
> I have not worked on puppet before except of downloading puppet on my 
> linux machine and playing with some commands just to get feel of it. I do 
> not work on Linux either but I do have fair background of linux.
>
> I am planning to give puppet certification in 2-3 months. Below are some 
> quesitons which I have.
>
> What type of hardware do I need ? (I only have one laptop, I can use 
> virtual box and fire couple of more systems), Should that be enough ? 
>


You should have at least two machines, whether physical or virtual.  More 
machines would allow you to explore marginally more Puppet features, but 
are probably not necessayr.

 

> I do believe I can download puppet version for free and use it to manage 
> 10 nodes but does it come with all require components?
>


I don't know what certification you are planning to take.  If it is 
specific to Puppet Enterprise, then be aware that PE comes packaged with 
all Puppet system components and a Ruby runtime to run them in, but the 
system does rely on you to provide a suitable OS and general operating 
environment.

The open source version of Puppet has fewer built in bells and whistles, 
but if that's all your certification is going to cover then you should not 
spend effort learning all the PE stuff.  Open source Puppet does not come 
packaged with a Ruby runtime, or various other generic components, but 
PuppetLabs does offer it in the form of packages for various operating 
systems that will help you install the needed third-party components.

 

> Is exam based on MCQ's ? 
>


You should consult the documentation of the exam.

 

> What is passing score ? 
>


You should consult the documentation of the exam, but what does it matter, 
anyway?  You learn the material as well as you can; you take the exam; you 
pass if you learned well enough, else not.


Any other information I should know ?
>


Generally speaking?  Far more than I could possibly convey in this venue.  
If you want a useful answer, you'll need to pose a more specific question.


John

-- 
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/c1c08139-5f69-45bd-820e-f778dc30a39f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to ensure a variable gets set, before a File or Service gets set.

2014-10-08 Thread jcbollinger


On Tuesday, October 7, 2014 9:20:41 AM UTC-5, Grant Schoep wrote:
>
> So I have the following puppet rule. Pasted below. The problem is, 
> sometimes, I see it looks like it is running the File before it sets the 
> variable $sendmail_file in the case statement above. The reason I believe 
> this, is because of the error message that it reports. Which is
>
> Error Message:
> err: /File[sendmailcf]/ensure: change from absent to file failed: Could 
> not set 'file on ensure: No such file or directory - 
> /etc/mail/sendmail.cf.puppettmp_6850 at 
> /etc/puppet/modules/sendmail/manifests/client.pp:40
>
> What I can't figure out, is how to ensure that that variable gets set, 
> before it gets used. Any pointers?
>


Puppet evaluates the class body in order, left-to-right, top-to-bottom, so 
I think your hypothesis is mistaken.  Moreover, your error message does not 
seem to agree with your hypothesis: it is about a *local* file on the node, 
whereas the only variable in your class controls which 'source' file to use 
on the master.  (The same principle is in operation even if you're running 
in masterless mode.)

It looks like Puppet wants to update your sendmail.cf.  In standard 
fashion, it tries to create the new version as a temp file first, which (if 
all goes well) it will later move to replace the original file.  It is 
unable to create the temp file, however, or else something prevents access 
to it or removes it again immediately after it is created.  Perhaps your 
disk is full, but more likely some form of access control is getting in 
Puppet's way.


John

-- 
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/a7508e41-5b64-4b7b-be92-d1ed0dbf15c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] vmware-vcsa module !!!

2014-10-08 Thread Rakesh Kathpal
I am using the module https://forge.puppetlabs.com/vmware/vcsa

Hv just added the following to the end of init.pp so that I can use this
"define" as a class

class vcsas($user_data) {
  create_resources('vcsa',$user_data)
}

>From foreman I am passing the following parameters

demo:
  username: root
  password: vmware
  server: 192.168.1.26
  db_type: embedded
  capacity: m


On Wed, Oct 8, 2014 at 6:25 PM, Brian Morris 
wrote:

> Hello Rakesh,
>
> Please post your code that this error comes from.
>
> --
> 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/c56382ed-2573-4f31-ab89-e60a08b010a3%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/CAEJrXMU0zvob3uJCyi-cOkr%2BswnQn8Rh6v0SwH0tBxbp0zjxyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] EXEC resource fails but does not log a failure

2014-10-08 Thread Brian Morris
Hello Paul,

I ran into this very issue recently. This happens because Powershell does not 
properly catch error events. If the PS engine is able to run the script engine 
while continuing on errors then it will exit with a code of 0. Even if your 
script utterly failed to run, if the PS engine does not experience an error of 
its own you get an exit code of 0.

There are ways to turn on better, more sane error trapping in PS, but this will 
cause you to go deep into MS' proprietary error code system. I get around all 
of this by just looking at the output of PS commands, such as checking for null 
output.

-- 
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/6d45774c-f751-459c-b196-c8e66ca83823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: EXEC resource fails but does not log a failure

2014-10-08 Thread jcbollinger


On Tuesday, October 7, 2014 11:15:23 AM UTC-5, Paul Chernoch wrote:
>
> I have an EXEC command that has an onlyif condition. When I have my puppet 
> service running as the correct user account, all goes well.
> When the puppet agent is running under an inadequately privileged account, 
> some operations fail silently.
>
> During a maintenance action, another staff member tried to upgrade the 
> puppet agent. 
> When that didn't work with our version of enterprise, he reinstalled 
> puppet, but forgot to change the service accounts to be our special puppet 
> user.
> That puppet user has access to Team Foundation Server while the default 
> account (NT System) does not.
> I expected that puppet enterprise would show error messages in the log and 
> show agent runs as failing.
> IT DID NOT.
>
> To diagnose the problem, I started a special shell using "Psexec.exe -i -s 
> cmd.exe". This sysinternals tool allows me to impersonate "nt 
> authority\system".
> While running under that account, I verified that my EXEC command and the 
> accompanying "onlyif" command each fail with error code 1.
>


It is not a Puppet error nor a reason for resource failure for the 'onlyif' 
command of an Exec to return a failure code.  Puppet interprets that as a 
signal that the Exec's command does not need to be run -- that's the whole 
purpose of 'onlyif'.  If Puppet ran your Exec's 'onlyif' command and it 
returned a failure code, as you suggest would have happened, then the Exec 
*succeeds*.  The onlyif result tells it that the Exec is already in sync.  
This is normal behavior.

 

> What should I do?
>
>
It depends on your intended result.  The 'onlyif', 'unless', and 'creates' 
parameters of an Exec serve the purpose of determining whether it is 
already in sync at the beginning of a catalog run.  If it is (because an 
'onlyif' fails, an 'unless' succeeds, or the target of 'creates' exists)  
then that Exec succeeds without its 'command' being run.  In many cases, 
that's exactly what's wanted.

On the other hand, if there is a command whose failure must cause the Exec 
to fail, then that command must be incorporated one way or another into the 
Exec's 'command' parameter.  Your options for that depend on the node 
environment (especially the OS); I cannot advise you well for Windows, but 
one alternative for making an Exec perform compound commands would be to 
put them all in a batch file and Exec that.  A universal alternative is to 
put each command in a separate Exec, and declare an appropriate 
relationship between them, perhaps something like this:

  exec { ${tfhistory_cmd}:
path  => $exec_path,
cwd   => $tf_dir_unix,
returns   => ["0"],
logoutput => true,
require   => Class['tfview::tfcomponents']
  } 

  exec { "tf view ${filename} /version:${versionspec}":
command   => $tfview_cmd,
path  => $exec_path,
cwd   => $tf_dir_unix,
returns   => ["0"],
logoutput => true,
require   => Exec[$tfhistory_cmd]
  } 

That means something closer to what you seem to want.


John

-- 
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/a8ed234b-20cf-4876-8671-109601eab478%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] vmware-vcsa module !!!

2014-10-08 Thread Brian Morris
Hello Rakesh,

Please post your code that this error comes from.

-- 
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/c56382ed-2573-4f31-ab89-e60a08b010a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Could not set 'file on ensure: undefined method `&' for "760"

2014-10-08 Thread Torsten Amshove
Ok, the other modules works because they don't create a new file.

If the file on the puppet client exists, (even an empty one) everything 
works fine - if you delete it, this error occures.

ensure => present,
and
ensure => file,
makes no difference

-- 
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/51bc397a-45f0-48ea-95da-1a4fc1744cb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Could not set 'file on ensure: undefined method `&' for "760"

2014-10-08 Thread Torsten Amshove
Any solution here?
I stuck at the same problem. puppet 2.6.18 on SLES 11

even if I remove the "mode" line it gets the same error with 644 instead of 
700

I think the message is more about the strange "&" whereever this came from.

Another strange thing: This only happens in one puppet module - the others 
works fine

-- 
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/f60c08cc-cf1a-4fbc-8b0a-10196116e7bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] New to puppet

2014-10-08 Thread Krishna Krishna
Ok,

I am newbie to puppet. So be nice. I may ask some stupid questions.

I could not find some similar post so creating new post.

I have not worked on puppet before except of downloading puppet on my linux 
machine and playing with some commands just to get feel of it. I do not 
work on Linux either but I do have fair background of linux.

I am planning to give puppet certification in 2-3 months. Below are some 
quesitons which I have.

What type of hardware do I need ? (I only have one laptop, I can use 
virtual box and fire couple of more systems), Should that be enough ? 
I do believe I can download puppet version for free and use it to manage 10 
nodes but does it come with all require components?
Is exam based on MCQ's ? 
What is passing score ? 
Any other information I should know ?

-- 
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/79dc4ccf-5c1a-43f2-9df1-6325c93cd35b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] What is the difference between puppetlabs modules and example42 modules?

2014-10-08 Thread liuxinguo
I found that many modules are both in puppetlabs and example42 , so what is 
the difference between puppetlabs and example42 , and how can I chose which 
to use?

-- 
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/d6ff287c-6af6-4c81-bb65-9df18de81d53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] beaker ec2 example, should this work?

2014-10-08 Thread Ken Barber
> The default.yaml is in the gist I supplied.  I used the el6 and centos6 64 
> from your sample project.

Taking a look again, its even more confusing than that, the platform
name you have used is pointing at one of the very very old AMI's. The
newer ones we actually use are private, but I don't have the ability
to make it public. Looks like its locked up in someone elses older
amazon account. Sorry about that. This is why we are slowly replacing
these older ones, the management of them has slipped, my fault mainly
- we'll work on that for PuppetDB.

> An Ami search on aws by the name or Ami ID didn't turn up any results which 
> is why I thought they were private.
>
> I'll try building an Ami with packer.Are there any conventions that need 
> to go into the VM required by beaker?

I think the main requirement to make your life easier, is to allow
logging in from root (which can be often disabled) this is often done
by changing just sshd_config (and hupping/restarting sshd), and
removing the /root/.ssh/authorized_keys files also. Some distros
support doing this kind of thing via cloud-init as well, so you can
pass something like:

#cloud-config
disable-root: false

Into the user_data field of packer for example, but not this will not
persist on its own, you can change the configuration in /etc/cloud/
and bake that setting into the image. This usually affects
Debian/Ubuntu images I believe, I haven't built one of the newer
centos images in a while so try firing up the image and checking if it
has /etc/cloud/ in its build, this usually indicates its got some sort
of cloud-init. Having said that, someone has a patch up for beaker to
allow logging in as non-root and 'fixing' this:

https://github.com/puppetlabs/beaker/pull/478

Beyond that it depends on the tests and helpers you want to use. Both
'curl' and 'git' are good tools to have around on an image, since a
lot of tests can utilize these commands, having said that some tools
on top of the image can most certainly be installed by beaker in the
spec_helper_acceptance.rb there is a section for doing this _before_
the suite runs.

In fact, the base beaker stuff will attempt to install items for you,
like timing is important so the code goes to lengths to make sure the
the image has the right tools before it uses ntp to update the time.
Having the tooling there (I believe it uses ntpdate? but look at your
log output from beaker it will tell you) should make that exercise
mildly faster.

Starting simple, and trying to run tests against an image is usually a
good move in general, and being additive when you need it. Like I said
you have two choices most of the time - bake in a tool, or do it
during the testing run _before_ suite ... its really dependant on the
wider problem you are going to solve with the image. Baking items into
the image will of course speed up the exercise at test time, at the
cost of forcing you to remake it when it needs a change. Starting
conservatively with what goes into the image I think is a good idea.

After that you'll start to see the wider problems when you run your
tests a lot ... such as the flakiness of public mirrors :-). But thats
a story for another day :-).

ken.

-- 
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/CAE4bNT%3DmaOQ9QvoVC-e9DkQm%2Bs7iRDrgt3%3Dvn%2BHYU%3D_Zvsw%3DAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] vmware-vcsa module !!!

2014-10-08 Thread Rakesh Kathpal
I have a esx host installed and a standalone centos server.

what I am trying to do is via foreman

- Setting up the module for centos server
- So that it can install vcsa on my esx server.

I end up getting error as

Info: Applying configuration version '1412754558'
Debug: PuppetX::Puppetlabs::Transport::Ssh initializing connection to:
192.168.1.26
Debug: Executing on 192.168.1.26:
vpxd_servicecfg eula read
Debug: Execution result:
sh: vpxd_servicecfg: not found

Error: /Stage[main]/Vcsas/Vcsa[demo]/Vcsa_eula[demo]: Could not evaluate:
odd number of arguments for Hash
/var/lib/puppet/lib/puppet/provider/vcsa_eula/default.rb:15:in `[]'
/var/lib/puppet/lib/puppet/provider/vcsa_eula/default.rb:15:in `exists?'
/usr/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in `retrieve'


Please node this is a vanilla esx server, do I need to do anything else
before applying the module..

any help is greatly appreciated.

Thanks,

Rakesh K.

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


Re: [Puppet Users] fstab dilemma - pounding on file_line and augeas

2014-10-08 Thread Felix Frank
On 10/07/2014 10:21 PM, Ramin K wrote:
> 
> If you're taking feature requests while, it would be awesome if the
> mount resource would allow you to mount without adding a line to fstab
> at all.

Have you tried "ensure => ghost"?

This is off the top of my head, this state may be called something else.

Cheers,
Felix

-- 
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/5434F719.8090904%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.