[Puppet Users] Exec on a node causing action on another node?

2015-02-26 Thread Erling Ringen Elvsrud
Hi

I try to solve the following case:

I have a bash script, cert_check.sh which is used to check Jboss 
certificates.
The script returns 0 if certs are still valid, 1 if they are about to 
expire and 2 if they
are already expired.

The script should be executed on all jboss nodes which is possible with a 
simple exec.

If the script returns 1 or 2 I would like another exec to be executed on a 
different node, possibly the puppetmaster.
That exec will perform a REST API call to a server with curl (probably 
another exec in Puppet).
That call will generate a new certificate and copy it back to the node with 
an expired/about to expire certificate.

Initially I was considering to just perform the call directly from each node
(exec with an unless attribute), but that is not ideal with respect to 
security
as the username/password for the REST API should not be visible on all 
nodes, 
and firewall openings to the host handling the certificate generating / 
copying 
must be added for all networks with jboss-servers.

Do you think it is possible to handle this with Puppet?

Thanks,

Erling



-- 
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/542ed92e-d85b-4f87-a01e-0fd6a111b0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: first custom type... in the weeds already

2015-02-26 Thread Peter Berghold
Puppet::Type.newtype(:bannerfile) do
  newparam(:name)do
  end
  newparam(:bannertext)do
  end

  newparam(:bannertext2)do
  end

end

but a name variable is being defined and I'm still seeing the issue.


On Thu, Feb 26, 2015 at 10:02 AM jcbollinger john.bollin...@stjude.org
wrote:



 On Wednesday, February 25, 2015 at 3:25:57 PM UTC-6, Salty Old Cowdawg
 wrote:

 I've created a very simple type as follows:

 Puppet::Type.newtype(:bannerfile) do
   @doc = Create a text file with banner text
   ensurable
   newproperty(:name)do
 isnamevar
   end
   newproperty(:bannertext)do
   end
   newproperty(:bannertext2)do
   end


 end
 doesn't do anything yet, but it is a start.

 I'm invoking it from a class thusly:

  bannerfile { /tmp/bannerfile:
   bannertext = This would be banner text,
   bannertext2 = $testmodule::config::line2

 }

 and when I run the Puppet agent I get:

 Error: Could not retrieve catalog from remote server: Error 400 on
 SERVER: No set of title patterns matched the title /tmp/bannerfile

 what on earth is it trying to tell me?



 It's telling you that the way your type's namevar is set up is wrong.  At
 a guess, Puppet thinks you have a composite namevar.  The custom type
 documentation https://docs.puppetlabs.com/guides/custom_types.html has
 this to say about namevars:

 There are three ways to designate a namevar. Every type must have *exactly
 one* parameter that meets *exactly one* of these criteria:

 *Option 1:* Create a parameter whose name is :name. Since most types
 just use :name as the namevar, it gets special treatment and will
 automatically become the namevar.
 [...]
 *Option 2:* Provide the :namevar = true option as an additional
 argument to the newparam call.
 [...]
 *Option 3:* Call the isnamevar method (which takes no arguments) inside
 the parameter’s code block.


 (emphasis in the original).  Your 'name' parameter meets *two* of those
 criteria, so I'd try omitting the 'isnamevar' from its code block to trim
 that back to one.


 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/0fc9f8dd-e584-4483-82aa-6d17c049bafc%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/0fc9f8dd-e584-4483-82aa-6d17c049bafc%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 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/CAArvnv1gaYtUHMGuRBQ5WzC78QZ6M7H9Z7%3DrHpHsSXwxuzobbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] MYSQL Net-SNMP

2015-02-26 Thread Sergiu Cornea
Hello guys,

I was wondering if someone can help me. 

I am looking for a Puppet net-snmp / snmp module which will work with MYSQL 
agent. I've searched on Google but at the moment I wasn't able to find 
anything that might help me.

Any help it is much appreciated.

Thank you!

Regards,

-- 


This message and its attachments are private and confidential. If you have 
received this message in error, please notify the sender and remove it and 
its attachments from your system.

The University of Westminster is a charity and a company 
limited by guarantee. Registration number: 977818 England. 
Registered Office: 309 Regent Street, London W1B 2UW.

-- 
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/34d47f3c-8434-4efc-ae0e-70d50879fcb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Newbie got cart before horse - how to make Puppet files match reality

2015-02-26 Thread jcbollinger

I hear your frustration, Karen.  I'm sorry this is proving to be such a 
hassle for you.

On Wednesday, February 25, 2015 at 4:35:11 PM UTC-6, Karen Ellrick wrote:


 It's understandable if the PuPHPet project does not support hand editing 
 its output...


 If that was the case, Juan wouldn't have told me in 
 https://github.com/puphpet/puphpet/issues/1352#issuecomment-72649784 
 https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fpuphpet%2Fpuphpet%2Fissues%2F1352%23issuecomment-72649784sa=Dsntz=1usg=AFQjCNEWv6mQcrfpkcV-JFSj7iFzz43pLw
  
 that I need to work with Puppet to do what I want. He seems to be saying 
 that the generated files can indeed be edited.



I'm trying not to bad-mouth Juan, but I read that github thread already, 
and it sounds to me as if he's brushing you off.  Yes, in principle you can 
edit the Puppet code and data that PuPHPet outputs to achieve any result 
you want.  By that same principle, you can also write Puppet code from 
scratch to do what you want.  Saying so doesn't get you any closer.  I am 
honestly uncertain whether starting from the PuPHPet output is any 
advantage to you, given that it doesn't provide everything you want, and 
you are not already well versed in Puppet.

 

 As PuPHPet developer, Juan is in a better position to give such advice, or 
 at least to tell you about how the generated code and data are organized, 
 which would help the rest of us advise you about what changes to make.


 When I asked Juan for help understanding the structure of the generated 
 code so that I'd know where to customize (
 https://github.com/puphpet/puphpet/issues/1352#issuecomment-72766107), 
 there was no response. He apparently doesn't have time to get into 
 specifics.



I'm sorry.  I don't have the much more time that I would need to analyze 
the code before I could spend time telling you what Juan already knows.  
Perhaps this thread will yet be noticed by someone who has already gone 
through that, or by someone who has the time and inclination to do all that 
analysis.  If PuPHPet has some kind of organized user community then that 
might be a richer environment for finding such a person.

Otherwise, all I can think to recommend is to either (a) learn Puppet well 
enough to take the lead yourself on sorting it out (we can help in more 
narrowly-scoped ways), or (b) hire a consultant.  If you're willing to do 
the former, then I've always found Puppet's online docs 
https://docs.puppetlabs.com/puppet/3/reference/ to be quite good.  There 
are good books about Puppet out there, too, though Puppet moves fast enough 
that those fall out of date unfortunately swiftly.

 

 The one I have been asking about all along is not really software per 
 se, but nginx configuration file content. So far no one has suggested 
 anything (even a link for more info) about how one gets that kind of thing 
 into Puppet. I'm using a PHP framework called Phalcon that needs some 
 special web server settings (
 http://docs.phalconphp.com/en/latest/reference/nginx.html#configuration-by-host)
  
 - I have it working on a VM, but I don't know how to get Puppet to create 
 it the next time.



Usually, files will be managed in Puppet via 'file' resources.  Very 
likely, your generated Puppet code has that wrapped in a class; a typical 
name for a class for that purpose would be nginx::config.  In a 
hand-turned Puppet manifest set you would expect to find a class of that 
name in file confdir/modules/nginx/manifests/config.pp.  Chances are good 
that such a File resource relies on an ERB template to define the file 
content; possibly you would find that in 
confdir/modules/nginx/templates/nginx.conf.erb.  Class and template 
likely one or both rely on data recorded in one or more YAML files 
somewhere central among the Puppet files.

I cannot say more without undertaking the analysis I described earlier, and 
you will have recognized that even what I did say is variously vague, 
uncertain, or both.  PuPHPet is in no way constrained to generate Puppet 
code that adheres to the same norms as hand-turned code, and in any case, 
most of the key bits involve details that I cannot hope to guess from 
here.  All this is multiplied by each thing you need to customize, and I am 
uncertain what it will take to carry any of it forward to future VMs.


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/1ccd004b-5d1c-4be2-aad9-04d85f5a1c72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Updating from 3.2.4 to 3.7.4 problem with exported resources

2015-02-26 Thread Marc
Update:

Looks like whatever is affecting me was introduced in puppet server 3.6.2

3.2.4 Works
3.3.2 Works
3.4.3 Works
3.5.1 Works
3.6.0 Works
3.6.1 Works
3.6.2 Fails
3.7.3 Fails
3.7.4 Fails

The release notes for 3.6.2:

Puppet 3.6.2
Security Fixes
Feature: Disabling Deprecation Warnings
Fix for Directory Environments Under Webrick
Fixes to purge_ssh_keys
Default environment_timeout increased
General Bug Fixes

Not sure where to start looking but we use config-files environments ...
I think I will update to 3.6.1 and start hunting deprecation warnings from 
there.

Thanks,
Marc

On Thursday, February 26, 2015 at 3:18:22 PM UTC+1, Marc wrote:

 Hi all,

 This is my current situation:

 Master A has:
  - port 8140
  - puppet server 3.2.4
  - puppetdb terminus 1.6.2

 Master B has:
  - port 8141
  - puppet server 3.7.4
  - puppetdb terminus 1.6.2

 PuppetDB has:
  - puppetdb 1.6.2

 Client has:
  - puppet client 3.2.4

 And my node manifest is:

 *node 'marc-test.demo.lan' {*

 *@@file { '/tmp/foo/bar':*
 *ensure = present,*
 *}   *
 *}*

 Where '/tmp/foo' does not exist.

 So, given the above information, if I issue the following command in the 
 client, everything works as expected:


 *[r...@marc-test.demo ~]# puppet agent -t --environment marc_villacorta 
 --masterport 8140*
 *...*
 *Info: Applying configuration version '1424959728'*
 *Notice: Finished catalog run in 19.06 seconds*

 But when I try the same against the 3.7.4 master the managed node attempts 
 to realize the exported resource:


 *[r...@marc-test.demo ~]# puppet agent -t --environment marc_villacorta 
 --masterport 8141*
 *...*
 *Info: Applying configuration version '1424959869'*
 *Error: Could not set 'present' on ensure: No such file or directory - 
 /tmp/foo/bar at 
 5:/etc/puppet/environments/marc_villacorta/manifests/nodes/marc-test.demo.lan.pp*
 *Error: Could not set 'present' on ensure: No such file or directory - 
 /tmp/foo/bar at 
 5:/etc/puppet/environments/marc_villacorta/manifests/nodes/marc-test.demo.lan.pp*
 *Wrapped exception:*
 *No such file or directory - /tmp/foo/bar*
 *Error: /Stage[main]//Node[marc-test.demo.lan]/File[/tmp/foo/bar]/ensure: 
 change from absent to present failed: Could not set 'present' on ensure: No 
 such file or directory - /tmp/foo/bar at 
 5:/etc/puppet/environments/marc_villacorta/manifests/nodes/marc-test.demo.lan.pp*
 *Notice: Finished catalog run in 98.65 seconds*

 I have tried to update the client to 3.7.4 but I get the same result.
 My puppet infrastructure is about 4 years old maybe I have configs with 
 deprecated stuff ...

 Any idea? A bug perhaps?

 Cheers
 Marc


-- 
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/e57bc68e-8cf8-40a6-aa69-14f51f7a3ec6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: delete line in file with substring xyz

2015-02-26 Thread jcbollinger


On Thursday, February 26, 2015 at 2:39:51 AM UTC-6, Andreas Dvorak wrote:

 Hi,

 I have just tried the stdlib version 4.5.1.
 According to the change log with version 4.5.0 
 Don't require line to match the match parameter
 But my test does not work
   file_line {'test':
 ensure = 'absent',
 path   = '/root/.ssh/authorized_keys',
 match  = 'test',
   }
 Error: Failed to apply catalog: Validation of File_line[test] failed: Both 
 line and path are required attributes at 
 /data/git/test/modules/accounts/manifests/del_key_in_root.pp:204
 Wrapped exception:
 Both line and path are required attributes



You could solve that issue by providing a 'line' property with a dummy 
value, as in some of your previous attempts.  Alas, although that should 
prevent the exception, it will not get you to where you want to be.  
File_line doesn't do that.

The key thing to understand here is that File_line represents a *specific* 
line in a file.  The 'match' parameter is *not* about recognizing that 
line, it is about how to introduce it into the file if that is necessary.  
When you ensure a File_line 'absent', you are saying that the file 
identified by it's 'path' should not contain any line that is an exact, 
character-for-character match to the 'line' parameter (because *that* is 
what the resource represents).

For SSH authorized keys in particular, you should look into the built-in 
Ssh_authorized_key resource type.  More generally, if there is not already 
a module or built-in resource type specific to the file you're trying to 
manage, and you don't want to create one, then the more-or-less universal 
fallback is an Exec resource.


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/fce3018d-8cc6-429c-8951-736e19ee528b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Inter-node dependency

2015-02-26 Thread lupindeterd
Hello,

I'm pondering what is the best way to approach this problem( without 
MCollective).

I have a serverA than will run a DB backup copy it over to serverB, then 
serverB do restore then notify serverA for it to execute the next phase of 
action.

This scenario will have to take at least four occurences back and forth between 
the two servers, this is to setup a log shipping for a DB server.

In my mind I can think of;

A) scp a file as flag every after execution between servers so it will only 
proceed to next step if flag file is present.
B) Export an Exec resources from one server to another
C) Create a wrapper script for tasks intended for serverB, execute the script 
from serverA using Exec resource.

I'm biased on B) if it's doable as I would love to have this pure DSL as much 
as possible but what would be the downside, performance?


Appreciate any input and further ideas.

cheers lupin

-- 
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/4ccb7b53-4f55-4eae-9b6f-a2802bde180f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: first custom type... in the weeds already

2015-02-26 Thread jcbollinger


On Wednesday, February 25, 2015 at 3:25:57 PM UTC-6, Salty Old Cowdawg 
wrote:

 I've created a very simple type as follows:

 Puppet::Type.newtype(:bannerfile) do
   @doc = Create a text file with banner text
   ensurable
   newproperty(:name)do
 isnamevar
   end
   newproperty(:bannertext)do
   end
   newproperty(:bannertext2)do
   end


 end
 doesn't do anything yet, but it is a start.

 I'm invoking it from a class thusly:

  bannerfile { /tmp/bannerfile:
   bannertext = This would be banner text,
   bannertext2 = $testmodule::config::line2

 }

 and when I run the Puppet agent I get:

 Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 No set of title patterns matched the title /tmp/bannerfile

 what on earth is it trying to tell me?



It's telling you that the way your type's namevar is set up is wrong.  At a 
guess, Puppet thinks you have a composite namevar.  The custom type 
documentation https://docs.puppetlabs.com/guides/custom_types.html has 
this to say about namevars:

There are three ways to designate a namevar. Every type must have *exactly 
 one* parameter that meets *exactly one* of these criteria:

 *Option 1:* Create a parameter whose name is :name. Since most types just 
 use :name as the namevar, it gets special treatment and will 
 automatically become the namevar.
 [...]
 *Option 2:* Provide the :namevar = true option as an additional argument 
 to the newparam call.
 [...]
 *Option 3:* Call the isnamevar method (which takes no arguments) inside 
 the parameter’s code block.


(emphasis in the original).  Your 'name' parameter meets *two* of those 
criteria, so I'd try omitting the 'isnamevar' from its code block to trim 
that back to one.


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/0fc9f8dd-e584-4483-82aa-6d17c049bafc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Updating from 3.2.4 to 3.7.4 problem with exported resources

2015-02-26 Thread Marc
Hi all,

This is my current situation:

Master A has:
 - port 8140
 - puppet server 3.2.4
 - puppetdb terminus 1.6.2

Master B has:
 - port 8141
 - puppet server 3.7.4
 - puppetdb terminus 1.6.2

PuppetDB has:
 - puppetdb 1.6.2

Client has:
 - puppet client 3.2.4

And my node manifest is:

*node 'marc-test.demo.lan' {*

*@@file { '/tmp/foo/bar':*
*ensure = present,*
*}   *
*}*

Where '/tmp/foo' does not exist.

So, given the above information, if I issue the following command in the 
client, everything works as expected:


*[r...@marc-test.demo ~]# puppet agent -t --environment marc_villacorta 
--masterport 8140*
*...*
*Info: Applying configuration version '1424959728'*
*Notice: Finished catalog run in 19.06 seconds*

But when I try the same against the 3.7.4 master the managed node attempts 
to realize the exported resource:


*[r...@marc-test.demo ~]# puppet agent -t --environment marc_villacorta 
--masterport 8141*
*...*
*Info: Applying configuration version '1424959869'*
*Error: Could not set 'present' on ensure: No such file or directory - 
/tmp/foo/bar at 
5:/etc/puppet/environments/marc_villacorta/manifests/nodes/marc-test.demo.lan.pp*
*Error: Could not set 'present' on ensure: No such file or directory - 
/tmp/foo/bar at 
5:/etc/puppet/environments/marc_villacorta/manifests/nodes/marc-test.demo.lan.pp*
*Wrapped exception:*
*No such file or directory - /tmp/foo/bar*
*Error: /Stage[main]//Node[marc-test.demo.lan]/File[/tmp/foo/bar]/ensure: 
change from absent to present failed: Could not set 'present' on ensure: No 
such file or directory - /tmp/foo/bar at 
5:/etc/puppet/environments/marc_villacorta/manifests/nodes/marc-test.demo.lan.pp*
*Notice: Finished catalog run in 98.65 seconds*

I have tried to update the client to 3.7.4 but I get the same result.
My puppet infrastructure is about 4 years old maybe I have configs with 
deprecated stuff ...

Any idea? A bug perhaps?

Cheers
Marc

-- 
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/87387bcd-9cdd-44cb-98b1-c9bc03822a0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] No puppet for Juniper SRX series?

2015-02-26 Thread Mauricio Tavares
According to 
http://forums.juniper.net/t5/API-zation/Automation-with-Chef-Puppet-and-Ansible/ba-p/261773,
 
only the QFX, EX, and MX family of routers and switches are supported by 
puppet. Can anyone confirm that the SRX routers are therefore left out in 
the rain? I did not get much of a reply in the Juniper forums. 

-- 
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/76c903d1-6cd9-47fb-962f-611beed4278f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Newbie got cart before horse - how to make Puppet files match reality

2015-02-26 Thread Juan Treminio
On Wednesday, February 25, 2015 at 4:35:11 PM UTC-6, Karen Ellrick wrote:


 It's understandable if the PuPHPet project does not support hand editing 
 its output...


 If that was the case, Juan wouldn't have told me in 
 https://github.com/puphpet/puphpet/issues/1352#issuecomment-72649784 that 
 I need to work with Puppet to do what I want. He seems to be saying that 
 the generated files can indeed be edited.


Hi Karen, I've responded to you on puphpet's issue tracker.
 

 As PuPHPet developer, Juan is in a better position to give such advice, or 
 at least to tell you about how the generated code and data are organized, 
 which would help the rest of us advise you about what changes to make.


 When I asked Juan for help understanding the structure of the generated 
 code so that I'd know where to customize (
 https://github.com/puphpet/puphpet/issues/1352#issuecomment-72766107), 
 there was no response. He apparently doesn't have time to get into 
 specifics.
  


I hope I addressed your questions. Note that everything I said is available 
within the gui itself, but it's probably my fault that you missed it - I am 
not a designer and UX isn't my forte. Most information is kind of 
haphazardly thrown in, and might be easy to miss.
 

 With regard to LaTeX specifically, there are packages in CentOS's standard 
 repositories, so you shouldn't need to configure a custom repository for it.


 The flavor I need is upTeX (https://www.ctan.org/pkg/uptex), which is a 
 bit non-standard, but I see that there are more repos for texlive stuff 
 than there were the last time I installed it, so I'll continue to 
 investigate that. I thought I was clever when I found a Puppet module for 
 texlive (https://github.com/andschwa/puppet-latex), but I apparently 
 don't understand how to use it. In Puppetfile I put 
 mod 'andschwa/puppet-latex', :git = '
 https://github.com/andschwa/puppet-latex.git'
 but all I get is the module downloaded and unpacked, not installed. I also 
 tried putting the contents of that github repo in puphpet/puppet/modules, 
 but that didn't help.
  

 If you in fact do need to manage software that's not available 
 pre-packaged from any public repository...


 The one I have been asking about all along is not really software per 
 se, but nginx configuration file content. So far no one has suggested 
 anything (even a link for more info) about how one gets that kind of thing 
 into Puppet. I'm using a PHP framework called Phalcon that needs some 
 special web server settings (
 http://docs.phalconphp.com/en/latest/reference/nginx.html#configuration-by-host)
  
 - I have it working on a VM, but I don't know how to get Puppet to create 
 it the next time.


If Phalcon needs special settings, you can either throw them into a bash 
file within the `puphpet/files/exec*` folders that will run on pre-defined 
`Vagrant` events (note that the Nginx puppet module I've chosen to use with 
PuPHPet *will* overwrite any non-standard configuration it did not add 
itself on every `vagrant provision`), or you can create Puppet code 
yourself to do what you want.

 Juan

-- 
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/d99ba98d-82e7-42ed-a8fe-de07ddd695c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Newbie got cart before horse - how to make Puppet files match reality

2015-02-26 Thread Juan Treminio
On Thursday, February 26, 2015 at 10:03:35 AM UTC-6, jcbollinger wrote:


 I hear your frustration, Karen.  I'm sorry this is proving to be such a 
 hassle for you.

 On Wednesday, February 25, 2015 at 4:35:11 PM UTC-6, Karen Ellrick wrote:


 It's understandable if the PuPHPet project does not support hand editing 
 its output...


 If that was the case, Juan wouldn't have told me in 
 https://github.com/puphpet/puphpet/issues/1352#issuecomment-72649784 
 https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fpuphpet%2Fpuphpet%2Fissues%2F1352%23issuecomment-72649784sa=Dsntz=1usg=AFQjCNEWv6mQcrfpkcV-JFSj7iFzz43pLw
  
 that I need to work with Puppet to do what I want. He seems to be saying 
 that the generated files can indeed be edited.



 I'm trying not to bad-mouth Juan, but I read that github thread already, 
 and it sounds to me as if he's brushing you off.  Yes, in principle you can 
 edit the Puppet code and data that PuPHPet outputs to achieve any result 
 you want.  By that same principle, you can also write Puppet code from 
 scratch to do what you want.  Saying so doesn't get you any closer.  I am 
 honestly uncertain whether starting from the PuPHPet output is any 
 advantage to you, given that it doesn't provide everything you want, and 
 you are not already well versed in Puppet.


Unfortunately this is a criticism I receive often. Maybe it's deserved. In 
my defense, however, I'd like to point out that when I first started 
puphpet I honestly thought only 10 people would ever find it useful. I had 
absolutely no idea it would ever gain as much popularity as it has seen. 
It's caught me completely off-guard and has turned me from a lucky-go-happy 
developer working on his small, personal project that just happens to be 
publicly-accessible, into the sole developer of a tool that thousands of 
developers are now using and depending on.

I don't *know* Puppet. I learned it as I went along. That's why the guys in 
Freenode's #puppet are supportive of me when I ask Puppet-specific 
questions, but generally look down on PuPHPet itself - because my Puppet 
code is amateur at worst, mediocre at best.

It has now reached a point where I am afraid of making changes to puphpet 
for fear of breaking something that I am unaware of. For PHP I am pretty 
good with writing unit tests and more or less follow TDD practices, but for 
Puppet I have no idea how to write unit tests. I know it would involve 
learning Ruby which I absolutely have no time (or much of an inclination, 
really) to do.

So the end result is that I'm stuck in a continuous rut where I will ignore 
puphpet for weeks, even months at a time, as my issue tracker grows 
steadily. Then I'll hit a day when my daytime work is done, my contracting 
work is caught up, my family is happy, and I miss working on it, and I will 
go through and work on ~50 issues in a 2-day span. Invariably I'll end up 
implementing some new feature and introducing 50 new bugs and the process 
begins again.

You'll notice in puphpet's commit history that the vast majority of commits 
have been from me. There's the odd PR here and there, of course, but mostly 
it's just been me chugging along on a project that I've enjoyed working on, 
but detracts from my day to day life.

So when you say I'm blowing someone off, I don't see it that way. I will 
provide support for my project. If someone wants to run something 
non-standard in their VM, I will offer encouragement and maybe some slight 
guidance, but that is all I am prepared to offer. I have enough on my plate 
to have to try and worry about things that aren't even in the project.

Karen, I understand my documentation is subpar. It's been on my to-do list 
as long as puphpet has existed. However, I do expect that when developers 
run into a brick wall that they tighten their belts and dive into the code, 
learn what's going on and implement their own solutions. It's completely 
open source, after all. I started puphpet having known not a thing about 
puppet a month previous (and it shows). The hard work has been done, now 
it's just trying to make sense of my madness :)

Thanks,
Juan

-- 
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/effcbbd0-5458-41cc-9d7b-35b6290aa241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: delete line in file with substring xyz

2015-02-26 Thread Andreas Dvorak
Dear all

now I tried

  file_line {'test':
ensure = 'absent',
path   = '/root/.ssh/authorized_keys',
line   = 'test',
  }
Line ssh-rsa SNNwKzN/c1JmSlYOy4hK1yYsOJKOK+n5Vivt3DJGwxL3VpU= test@abc is 
still there

With
  file_line {'test':
ensure = 'absent',
path   = '/root/.ssh/authorized_keys',
match  = 'test',
  }

I get the error Error: Failed to apply catalog: Validation of 
File_line[test] failed: Both line and path are required attributes at 
/data/git/test/modules/accounts/manifests/del_key_in_root.pp:204

With this the line is not removed.
  file_line {'test':
ensure = 'absent',
path   = '/root/.ssh/authorized_keys',
line   = 'test',
match  = 'test',
  }

Best regards
Andreas

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/effd1d59-703b-4fed-b9f2-ba0d21a17e60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: delete line in file with substring xyz

2015-02-26 Thread Andreas Dvorak
Hi,

I have just tried the stdlib version 4.5.1.
According to the change log with version 4.5.0 
Don't require line to match the match parameter
But my test does not work
  file_line {'test':
ensure = 'absent',
path   = '/root/.ssh/authorized_keys',
match  = 'test',
  }
Error: Failed to apply catalog: Validation of File_line[test] failed: Both 
line and path are required attributes at 
/data/git/test/modules/accounts/manifests/del_key_in_root.pp:204
Wrapped exception:
Both line and path are required attributes

Andreas

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ec927e8a-21ca-4351-abff-d032a6faae20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.