Re: [Puppet Users] templatizing a configuration file

2014-07-07 Thread Paolo Supino
Hi Christopher

Thanx for the reply :)

If anyone ever looks for a similar problem...
Someone (don't remember the user's NIC, sorry) on Puupet's IRC channel
suggested using Puppet's template iteration (as explained  here:
http://docs.puppetlabs.com/guides/templating.html#iteration).








Paolo


On Fri, Jul 4, 2014 at 2:54 PM, Christopher Wood  wrote:

> If I were implementing this I would put a list of files in hiera and have
> my template dump the list into my file. My untested example is below.
>
> Hiera:
>
> ---
> psconfs:
>   - al-runtime.conf
>   - al-ldap.conf
>   - al-cluster.conf
>
> Puppet class (puppet 3 or higher):
>
> class psthing ($psconfs = []) {
>   file { '/path/to/conf':
> content => template('psthing/mytemplate.erb'),
>   }
> }
>
> Template:
>
> <% @psconfs.each do |file| %>
> include-and-override=${configDir}/<%= file %>
> <% end %>
>
>
> There's a similar example here:
>
> http://docs.puppetlabs.com/learning/templates.html#editing-the-templates
>
>
> On Fri, Jul 04, 2014 at 10:13:38AM +0200, Paolo Supino wrote:
> >Hi
> >I want to templatize (we use hiera with yaml backend) a configuration
> file
> >that has the following content:
> >---
> >include-and-override=${configDir}/al-runtime.conf
> >include-and-override=${configDir}/al-ldap.conf
> >include-and-override=${configDir}/al-cluster.conf
> >include-and-override=${configDir}/al-jaas.conf
> >include-and-override=${configDir}/al-internal.conf
> >include-and-override=${configDir}/al-external.conf
> >---
> > The number of lines and content of the include-and-override directive
> >changes between systems...
> >Can it be done?
> >TIA
> >Paolo
> >
> >--
> >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 [1]puppet-users+unsubscr...@googlegroups.com.
> >To view this discussion on the web visit
> >[2]
> https://groups.google.com/d/msgid/puppet-users/CA%2BB25Bw%2B_g4TQq7eUsHRzLD0JhHYOaerjVep11dYuAZNmu96Yg%40mail.gmail.com
> .
> >For more options, visit [3]https://groups.google.com/d/optout.
> >
> > References
> >
> >Visible links
> >1. mailto:puppet-users+unsubscr...@googlegroups.com
> >2.
> https://groups.google.com/d/msgid/puppet-users/CA%2BB25Bw%2B_g4TQq7eUsHRzLD0JhHYOaerjVep11dYuAZNmu96Yg%40mail.gmail.com?utm_medium=email&utm_source=footer
> >3. 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/20140704125434.GB24862%40iniquitous.heresiarch.ca
> .
> 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/CA%2BB25BzXx5rsUmjCWQDBu2UjGw99Ty4yJnM2rPjBXdqAgwvkew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: rspec-puppet: how to pass undef as parameter value?

2014-07-07 Thread Dominic Cleal
Sorry for bringing up an old thread, but I hit the same issue and found
a workaround.

rspec-puppet calls #inspect on the parameter values to see how they
should be represented in Puppet's DSL, so passing a string in causes it
to get quoted (as String#inspect returns a quoted string).

Instead, I created a small class that returns an unquoted value.

in spec_helper.rb:
class Undef
  def inspect
'undef'
  end
end

and then to use it:
let(:params) do
  { :example => Undef.new }
end

-- 
Dominic Cleal
Red Hat Engineering

On 27/04/14 15:38, Remi Ferrand wrote:
> Hi everyone,
> 
> thanks all for your answers but i'm starting to think that there is way
> to pass puppet "undef" value from a rspec test...
> If anybody has the solution to fix this test suite
> (https://github.com/riton/puppetrspec) please tell me; otherwise I'll
> have to rewrite my manifests and replace the puppet "undef" value with a
> simple "undef" string where it is possible...
> 
> It doesn't have the same meaning but it can help me moving on with my
> test suite.
> 
> Thaks.
> 
> Rémi
> 
> 
> On Tue, Apr 22, 2014 at 12:57 PM, Nan Liu  > wrote:
> 
> On Tue, Apr 22, 2014 at 4:34 AM, Remi Ferrand
>  > wrote:
> 
> Hi Nan,
> 
> thanks for your answer.
> With this modification:
> 
> diff --git a/spec/classes/puppetrspec_spec.rb
> b/spec/classes/puppetrspec_spec.rb
> index 9d06d79..80fae58 100644
> --- a/spec/classes/puppetrspec_spec.rb
> +++ b/spec/classes/puppetrspec_spec.rb
> @@ -22,7 +22,7 @@ describe 'puppetrspec', :type => :class do
>  context 'with ensure undef' do
>  
>  let :params do {
> -:ensure => '# WHAT SHOULD WE USE HERE TO PASS
> PUPPET undef VALUE ?#'
> +:ensure =>  :undef
>  } end
>  
>  it 'should have File with ensure absent' do
> 
> 
> it fails with this error:
> 
> % rake spec   
> /usr/bin/ruby -S rspec spec/classes/puppetrspec_spec.rb --color
> .F
> 
> Failures:
> 
>   1) puppetrspec with ensure undef should have File with ensure
> absent
>  Failure/Error: should
> contain_file(filename).with_ensure('absent')
>  Puppet::Error:
>Could not parse for environment production: Syntax error
> at ':'; expected '}' at line 4 on node ...
>  # ./spec/classes/puppetrspec_spec.rb:30
> 
> Finished in 1.51 seconds
> 2 examples, 1 failure
> 
> Failed examples:
> 
> rspec ./spec/classes/puppetrspec_spec.rb:29 # puppetrspec with
> ensure undef should have File with ensure absent
> 
> 
> Same error with this modification:
> 
> diff --git a/spec/classes/puppetrspec_spec.rb
> b/spec/classes/puppetrspec_spec.rb
> index 9d06d79..63faa11 100644
> --- a/spec/classes/puppetrspec_spec.rb
> +++ b/spec/classes/puppetrspec_spec.rb
> @@ -21,9 +21,9 @@ describe 'puppetrspec', :type => :class do
>  
>  context 'with ensure undef' do
>  
> -let :params do {
> -:ensure => '# WHAT SHOULD WE USE HERE TO PASS
> PUPPET undef VALUE ?#'
> -} end
> +let(:params) {{
> +:ensure =>  :undef
> +}}
> 
> 
> If you have any other idea, let me know :-)
> 
> 
> So internally it appears to be :undef, and I thought that would work
> for rspec, but clearly not.
> 
> https://github.com/puppetlabs/puppet/blob/master/spec/unit/parser/ast/leaf_spec.rb#L101
> 
> Trying to set it to Puppet::Parser::AST::Undef resulted in the wrong
> behavior with "if $var {...}". I may have mixed this up with a
> puppet function where I needed to return undef. I guess I shouldn't
> count on my memory at this hour of the day.
> 
> Nan
> 
> -- 
> You received this message because you are subscribed to a topic in
> the Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/6nL2eROH8is/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CACqVBqBGogT4Fig6fsH5drRjyRPyJcTmnkxBYh2gSOYyfutaUg%40mail.gmail.com
> 
> .
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received

Re: [Puppet Users] How to deploy code in agent machines from Master

2014-07-07 Thread Satish Katuru
Thanks for your reply Rich.I will try to explore Mcolletive and try to do 
it.

Satish.

On Saturday, July 5, 2014 12:07:46 AM UTC+5:30, Rich Burroughs wrote:
>
> The Puppet agent runs are initiated on the agent side. There is no Puppet 
> master command that you can use to trigger an agent run.
>
> If you want to do something like kick off multiple agent runs at the same 
> time or in a sequence, you can do that with Mcollective. Mcollective comes 
> with Puppet Enterprise, you could actually trigger the agent runs from the 
> PE console. Or if you're using open source Puppet you can install 
> Mcollective separately and use the mco command to start agent runs. There's 
> an Mcollective plugin you need installed to be able to control the agents.
>
> There are other orchestration tools that you could use for this sort of 
> thing besides Mcollective, like Fabric or Ansible. You would just have them 
> run the same command you would run to start the agent.
>
> Also once you have a signed cert you don't need to use waitforcert. You 
> can just run "puppet agent -t" on the agent host.
>
>
>
> Rich
>
>
>
> On Friday, July 4, 2014, Satish Katuru > 
> wrote:
>
>> Hi,
>>
>> My init.pp has 4 nodes and I want to control all these 4 nodes from the 
>> Master.I mean to say how to deploy the code in all the nodes from Master?
>>
>> If I execute Puppet agent -t --waitforcert=60 on Agent machine it reads 
>> init.pp on Master and deploy the code in Agent.
>> But I can't run this on each and every node.So how to do it?
>>
>> Do we have any other command to run it from Master?
>>
>> Regards,
>> Sathish.
>>
>> -- 
>> 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/4dbe8930-0499-4a57-87c3-5a12b54bdbec%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/dcbacc38-25d8-4250-bf42-14ed180a8053%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Execute commands on puppet master

2014-07-07 Thread shashank sinha
Hello,

I am working on some project where I need to execute scp command on puppet 
master to copy files from some external server to module/files/* each time 
when puppet agent pull request received to master.I want something like to 
copy a file and store it to puppet master /modules/files folder. 

Is it possible to execute scp commands on puppet master 
(password/password-less environment).

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/596e7b43-a7ba-4ad0-a507-5fa66383a8d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Resource: destroy before create?

2014-07-07 Thread Andreas Schuster
Hi John,

many thanks for your answer. It was really helpful. But i must make one 
modificatiotion:

resources { 'ipaddress':
  purge => true,
} -> Ipaddress<| enusre == absent |>

Now this works really fine and he purges before he creates new 
resources/Ipaddresses :-)

Regrads,
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/42df46df-a211-4887-9cc1-c1923bb899b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Submit puppet apply-genereated reports to master?

2014-07-07 Thread alexbozhenko
Hello, everybody.

I have a report files, that was generated with puppet apply, located in 
/var/lib/puppet/reports/$(hostname)/$date.yaml. 
Can I upload them to puppet master?
I'm using foreman, and it have own report engine, configured at master. 
Most of my hosts are managed with puppet agents, and agents uploading 
reports to master successfully. After that reports is processed with 
foreman report engine. What do I want is to upload reports, that was 
genereated by puppet apply to the master, as agents do.

Does
puppet report submit 
designed for that? If yes, how to use it?
man puppet-report said that submit is "API only". How can I use it in my 
case?

I found that 
puppet facts upload --server puppet.local
works well.

Thanks in advance.

-- 
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/6331ff98-d9e0-40bf-a727-4b067a54d571%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Making a node use a different manifest

2014-07-07 Thread Roger Sherman
Hi Den, and thank you for the response.

There is some data that will need to be rsynced, but mostly it's drawing 
from mysql nodes, and not storing or creating data itself.

One issue, though, that I wonder if just copying and pasting into the spare 
nodes manifest - I need the hostname to change as well. I'm assuming to do 
that, I delete the certs on the agent and master, and send another 
certificate request from the agent to the master? Or is there a better way 
to handle that?

Thank you,

Roger

On Sunday, July 6, 2014 5:21:13 PM UTC-4, denmat wrote:
>
> Hi Roger,
>
> Yes you can copy the critical node configuration into the spare node's. 
>
> However, it really does depend on what that critical node does and any 
> special requirements it has. It may have services that might need to be 
> managed across one by one. Or it may require one node to be shutdown before 
> the other come up. 
>
> Anyway, short answer is yes, you can copy the node definitions if that 
> makes sense to do so.
>
> HTH
> Den
>
> On 7 Jul 2014, at 4:44, Roger Sherman > 
> wrote:
>
> Hi,
>
> I've inherited an environment that is using Puppet 2.7. We're migrating 
> from one datacenter to another, but we're still running out of the old 
> datacenter. Some of our hardware there is reaching EOL, and it's creating a 
> situation that I, with my limited Puppet experience, am not really sure how 
> to procede. 
>
> We have a node that is fairly critical, that may be dying. Long story 
> short, we have a a server there that has the same resource setup (CPU, RAM, 
> etc), that isn't doing anything, and we want the spare node to take over 
> for the critical node. After much discussion, we think the easiest way to 
> make that happen is by running the puppet manifest for the critical node, 
> on the spare node.
>
> This raises a couple of questions - the one that I'm having the most 
> trouble wrapping my head around is, what is the best method for making the 
> spare node use the critical nodes manifest? I don't think I can just copy 
> and paste it into the spare nodes manifest (it used to be part of a 
> different group of servers), can I? I assume I need to change the 
> hostname...if so, what is the best method for doing so?
>
> Both nodes are running Debain 6 - any and all help would be greatly 
> appreciated.
>
> Thank you,
>
> Roger
>
> -- 
> 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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/b888c8d1-e541-43e3-bb97-d8245651b38a%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/abbe4a77-3ed2-4981-afe8-d8abd34c6752%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] My hiera entries parse incorrectly

2014-07-07 Thread Marc Whittaker
Thanks for the suggestions Rich.

I did try double quotes and the result if the same so still no progress.

Hoping someone out there has a colon in their data and can point me in the 
right direction.

On Friday, 4 July 2014 15:37:49 UTC-4, Rich Burroughs wrote:
>
> Ah ok. I was looking at this page:
>
> http://www.yaml.org/YAML_for_ruby.html
>
> Which is linked here:
>
> http://docs.puppetlabs.com/hiera/1/data_sources.html
>
> It seems to indicate that you don't need to escape colons in single quoted 
> strings but maybe I'm misreading it.
>
> I don't think I've ever had a colon in my data. You might try double 
> quotes too if you haven't. Or maybe someone who knows for sure will pipe in 
> :)
>
>
> Rich 
>
> On Friday, July 4, 2014, Marc Whittaker > 
> wrote:
>
>> Actually if I remove the backslash the result is instead
>>
>> marcstest1.password='CheckingThis'
>>
>>
>> and if I shift the backslash to after the colon I get 
>>
>> marcstest1.password='Checking:\ This'
>>
>>
>> On Friday, 4 July 2014 14:28:09 UTC-4, Rich Burroughs wrote:
>>>
>>> Hi Marc,
>>>
>>> Have you tried removing that backslash? I don't think you need to escape 
>>> the colon.
>>>
>>>
>>> Rich 
>>>
>>> On Friday, July 4, 2014, Marc Whittaker  wrote:
>>>
 Hi Everyone,

 I have run into an issue using puppet with hiera. The situation is I 
 have the following in a yaml file

 - marcstest1.password='Checking\: This'

 When I try to fill this into a file using a template similar to below 
 this is what gets put into the file instead
  
 # General Settings
 <% props.each do |prop| -%>
 <%= prop %>
 <% end -%>

 marcstest1.password='Checking\This'
  
 when the expected result is marcstest1.password='Checking: This'

 Can anyone tell me what I am doing wrong?

 -- 
 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/b08b25d5-621f-467c-96a2-92a2cf9231e2%
 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/fddcac35-1bc7-474d-b892-8450e2201e6d%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/ae2d8365-512c-4b90-b228-87d91fecc41d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Apt: Execute sources before builddep

2014-07-07 Thread jcbollinger


On Saturday, July 5, 2014 9:22:38 PM UTC-5, David Mohl wrote:
>
> Hello,
>
> I am scratching my head on this one. For a project, I need to compile a 
> package from source that depends on a apt source package. Since I am 
> managing package sources with puppet, I need apt-get builddep to be 
> executed *after* sources have been added. 
>
> All my sources are managed inside the class 'sources' through apt::source. 
> However, when I require that class for builddep, I am falling into a huge 
> dependency cycle: (Anchor[apt::source::puppetlabs] => 
> Apt::Source[puppetlabs] => Class[Sources] => Apt::Builddep[something] => 
> Exec[apt-builddep-something] => Exec[apt_update] => Class[Apt::Update] => 
> Anchor[apt::source::puppetlabs])
>
> When I omit the requirement, puppet executes builddep before the sources 
> have been added and the command fails. 
>
> After a lot of debugging, trying and reading through the apt source, I 
> came to the conclusion that this is a problem inside apt. I am out of 
> ideas. 
> Does anyone here have a idea for this problem or should I start patching 
> apt? 
>


I'm not quite clear on what your class 'sources' is doing, or why it needs 
to do it via Apt::Source and yet also be applied before builddep.  Is there 
any chance that you are conflating the two very different meanings of 
"source" that are in play here?  Apt::Source is about managing Apt 
'sources', a.k.a. package repositories.  That has little directly to do 
with "source" in the sense of software source code.

Your class 'sources' needs to be applied before Apt::Builddep[something] 
only if it is managing an Apt *source* (e.g. a local repository); else it 
cannot have any effect on build-dep.  Remove the relationship if 
Class['sources'] is not managing an Apt source.

Your class 'sources' needs to be applied after Apt::Source[puppetlabs] only 
if it manages an Apt *package* that depends on a package from the 
'puppetlabs' Apt repository.  Remove the relationship if Class['sources'] 
is not managing such a package.

If Class['sources'] is doing both of the above then either split it into 
two classes, or move the relationship ends from the class itself to the 
appropriate resources inside.

If you split the class, then the part managing the Apt::Source must be 
applied before Apt::Builddep, but it needs no relationship with any other 
Apt::Source.  On the other hand, the part managing packages shouldn't need 
any direct dependencies on any of the Apt machinery, as the apt module 
already ensures that all Apt::Builddeps are run at an appropriate point.


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/8141a0e1-bd8f-4ce3-9627-6614c50eab1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Making a node use a different manifest

2014-07-07 Thread jcbollinger


On Monday, July 7, 2014 8:01:18 AM UTC-5, Roger Sherman wrote:
>
> Hi Den, and thank you for the response.
>
> There is some data that will need to be rsynced, but mostly it's drawing 
> from mysql nodes, and not storing or creating data itself.
>
> One issue, though, that I wonder if just copying and pasting into the 
> spare nodes manifest - I need the hostname to change as well. I'm assuming 
> to do that, I delete the certs on the agent and master, and send another 
> certificate request from the agent to the master? Or is there a better way 
> to handle that?
>
>

If you are going to change the spare's hostname (and you are using 
hostnames as node identifiers, which is the default) then you should clean 
its current cert from the master, clean the whole /var/lib/puppet/ssl 
directory from the node, and have the node recertify with the master.  If 
it happens that you are changing the node's hostname to the erstwhile 
hostname of the current prod server then you will also need to clean the 
prod server's cert from the master before it will sign a new cert for the 
same node identifier.

If you want the current and future servers both to be able to sync to the 
master during the transition, then you should also be able to make the 
spare usurp the prod server's identity by wiping the spare's 
/var/lib/puppet/ssl and putting a copy of the prod server's in its place.  
The spare should then receive the same catalogs as the prod server, modulo 
differences arising from different node facts.  You can do that before 
changing the spare's hostname, as it is only convention that hostnames 
match the identifier on their SSL certs.


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/20dfb626-10bf-4bdd-8d51-2ace64e83582%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Making a node use a different manifest

2014-07-07 Thread Roger Sherman
Thanks John, I think that answers the rest of my question.

I'm actually doing this in stages - the critical node is 
worker3.blahblah.com, so I'm making spare.blahblah.com into 
worker4.blahblah.com (with the critical services not started), then I'll be 
rsyncing, and then shutting down worker3, and changing the hostname of 
worker4 to worker3.

Thank you, 

Roger

On Monday, July 7, 2014 10:42:15 AM UTC-4, jcbollinger wrote:
>
>
>
> On Monday, July 7, 2014 8:01:18 AM UTC-5, Roger Sherman wrote:
>>
>> Hi Den, and thank you for the response.
>>
>> There is some data that will need to be rsynced, but mostly it's drawing 
>> from mysql nodes, and not storing or creating data itself.
>>
>> One issue, though, that I wonder if just copying and pasting into the 
>> spare nodes manifest - I need the hostname to change as well. I'm assuming 
>> to do that, I delete the certs on the agent and master, and send another 
>> certificate request from the agent to the master? Or is there a better way 
>> to handle that?
>>
>>
>
> If you are going to change the spare's hostname (and you are using 
> hostnames as node identifiers, which is the default) then you should clean 
> its current cert from the master, clean the whole /var/lib/puppet/ssl 
> directory from the node, and have the node recertify with the master.  If 
> it happens that you are changing the node's hostname to the erstwhile 
> hostname of the current prod server then you will also need to clean the 
> prod server's cert from the master before it will sign a new cert for the 
> same node identifier.
>
> If you want the current and future servers both to be able to sync to the 
> master during the transition, then you should also be able to make the 
> spare usurp the prod server's identity by wiping the spare's 
> /var/lib/puppet/ssl and putting a copy of the prod server's in its place.  
> The spare should then receive the same catalogs as the prod server, modulo 
> differences arising from different node facts.  You can do that before 
> changing the spare's hostname, as it is only convention that hostnames 
> match the identifier on their SSL certs.
>
>
> 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/043a1b1a-4d67-45de-b799-adee19f9d974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] My hiera entries parse incorrectly

2014-07-07 Thread jcbollinger


On Monday, July 7, 2014 9:18:07 AM UTC-5, Marc Whittaker wrote:
>
> Thanks for the suggestions Rich.
>
> I did try double quotes and the result if the same so still no progress.
>
>

Yours is neither a single-quoted nor a double-quoted value.  It is an 
unquoted value with a single quotes somewhere in the middle and at the 
end.  In other words, the quotes are part of the data (which is apparently 
intentional), not significant to the language syntax.  I think this would 
work:

- "marcstest1.password='Checking: This'"


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/a26564cf-9849-4bd4-82c9-c7306408ac11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet, Vagrant and repos

2014-07-07 Thread Andrei Maxim

Hi,

I've been looking into Puppet recently and I'm trying to setup a couple 
of virtual machines that should mimick what's in production. I'm pretty 
much a developer trying to lean towards DevOps :-)


Locally, I'm using Vagrant and the CentOS 6.5 64-bit box with Puppet 
3.4.3 that was published by Puppetlabs, which should somewhat mirror 
what's on the servers (a custom AMI based on CentOS 6.5).


What I'm trying to do right now -- and I've found a bunch of ways to do 
this -- is to setup a couple of repositories (EPEL and MySQL Community 
being the most important ones). I've noticed that people do this in a 
number of ways, from grabbing the RPM package to using the 'yumrepo' 
type to adding a custom module for each repo or by using a general 
purpose Yum module (like the one from example42) and specifying the 
repos there.


Normally, when I install those repos, I download the RPM locally and 
install it using the command line, for example:


yum install 
http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

That RPM will create a number of entries in the /etc/yum.repos.d/, 
which seems odd to add each one by hand using the `yumrepo` type.


I've seen this example given a number of times (it's also the correct 
answer to a similar question on SO):


node default {
  include base
}

class base {
  yumrepo { "IUS":
 baseurl => 
"http://dl.iuscommunity.org/pub/ius/stable/$operatingsystem/$operatingsystemrelease/$architecture";, 


 descr => "IUS Community repository",
 enabled => 1,
 gpgcheck => 0
  }
}

Then, for any node that extends base you can say
class foo {
  package { "bar": ensure => installed, require => Yumrepo["IUS"] }
}

Going back to the example with the MySQL Community RPM, I would have to 
manually do this for three repos (the other two are disabled):


* mysql-connectors-community
* mysql-tools-community
* mysql56-community

Is this still the accepted solution in the Puppet community? If so, how 
would you organize those repositories? Create a module for each 
repository? Create a repository module with all the sources?


And, somewhat related to this subject, I've noticed that I might get 
some errors when provisioning my VMs because the base system wasn't up 
to date. I was planning to add a `yum update` command to my setup, but 
I realize that this might not be the best solution because I might not 
want to update the base system everytime I run puppet.


What's the best way to update the system only when running Puppet for 
the first time?


Thanks,
Max


--
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/lpeenc%243ai%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet, Vagrant and repos

2014-07-07 Thread Doug Forster
Max,

I do a single module for each repo that I want added. In some cases I
combine it with a repo to manage the service. IE mysql* repos would be
managed via the mysql module.

As for making sure they are all up to date I might just create an
exec {my_check_update:
  refreshonly => true,
  command => "yum check-update",
}

I might even try to setup a global dependency in your site.pp. Someone else
probably has a smarter idea though.
Yumrepo { notify => Exec[my_check_update] }

In case you may have missed it on all my vagrant boxes I run a yum
check-update each time they are provisioned.
Vagrant.configure("2") do |config|
  config.vm.provision "shell",
inline: "yum check-update"
end

Hope it helps. :)
Doug


On Mon, Jul 7, 2014 at 9:35 AM, Andrei Maxim  wrote:

> Hi,
>
> I've been looking into Puppet recently and I'm trying to setup a couple of
> virtual machines that should mimick what's in production. I'm pretty much a
> developer trying to lean towards DevOps :-)
>
> Locally, I'm using Vagrant and the CentOS 6.5 64-bit box with Puppet 3.4.3
> that was published by Puppetlabs, which should somewhat mirror what's on
> the servers (a custom AMI based on CentOS 6.5).
>
> What I'm trying to do right now -- and I've found a bunch of ways to do
> this -- is to setup a couple of repositories (EPEL and MySQL Community
> being the most important ones). I've noticed that people do this in a
> number of ways, from grabbing the RPM package to using the 'yumrepo' type
> to adding a custom module for each repo or by using a general purpose Yum
> module (like the one from example42) and specifying the repos there.
>
> Normally, when I install those repos, I download the RPM locally and
> install it using the command line, for example:
>
> yum install http://dev.mysql.com/get/
> mysql-community-release-el6-5.noarch.rpm
>
> That RPM will create a number of entries in the /etc/yum.repos.d/, which
> seems odd to add each one by hand using the `yumrepo` type.
>
> I've seen this example given a number of times (it's also the correct
> answer to a similar question on SO):
>
> node default {
>   include base
> }
>
> class base {
>   yumrepo { "IUS":
>  baseurl => "http://dl.iuscommunity.org/pub/ius/stable/$
> operatingsystem/$operatingsystemrelease/$architecture",
>  descr => "IUS Community repository",
>  enabled => 1,
>  gpgcheck => 0
>   }
> }
>
> Then, for any node that extends base you can say
> class foo {
>   package { "bar": ensure => installed, require => Yumrepo["IUS"] }
> }
>
> Going back to the example with the MySQL Community RPM, I would have to
> manually do this for three repos (the other two are disabled):
>
> * mysql-connectors-community
> * mysql-tools-community
> * mysql56-community
>
> Is this still the accepted solution in the Puppet community? If so, how
> would you organize those repositories? Create a module for each repository?
> Create a repository module with all the sources?
>
> And, somewhat related to this subject, I've noticed that I might get some
> errors when provisioning my VMs because the base system wasn't up to date.
> I was planning to add a `yum update` command to my setup, but I realize
> that this might not be the best solution because I might not want to update
> the base system everytime I run puppet.
>
> What's the best way to update the system only when running Puppet for the
> first time?
>
> Thanks,
> Max
>
>
> --
> 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/lpeenc%243ai%241%40ger.gmane.org.
> 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/CAOwhAcq7_DyNaNo8ahYT%3DS0j5LW5BvcvznU3n%2BgP0_s-SruMcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet, Vagrant and repos

2014-07-07 Thread Yanis Guenane
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To second Doug, I also uses a module for each repo I want to add.
This way you can probably have a base profile, like the following :

class profile::base {

  resources { 'yumrepo' :
purge => true,
  }

  include ::epel
  include ::nginx
  include ::repoforge
}

And only the module you specify will be enabled. It will be clear for
whoever look at the code which repo are to be enabled.

- --
Yanis Guenane

On 07/07/2014 12:01 PM, Doug Forster wrote:
> Max,
> 
> I do a single module for each repo that I want added. In some cases
> I combine it with a repo to manage the service. IE mysql* repos
> would be managed via the mysql module.
> 
> As for making sure they are all up to date I might just create an 
> exec {my_check_update: refreshonly => true, command => "yum
> check-update", }
> 
> I might even try to setup a global dependency in your site.pp.
> Someone else probably has a smarter idea though. Yumrepo { notify
> => Exec[my_check_update] }
> 
> In case you may have missed it on all my vagrant boxes I run a yum 
> check-update each time they are provisioned. Vagrant.configure("2")
> do |config| config.vm.provision "shell", inline: "yum
> check-update" end
> 
> Hope it helps. :) Doug
> 
> 
> On Mon, Jul 7, 2014 at 9:35 AM, Andrei Maxim
>  wrote:
> 
>> Hi,
>> 
>> I've been looking into Puppet recently and I'm trying to setup a
>> couple of virtual machines that should mimick what's in
>> production. I'm pretty much a developer trying to lean towards
>> DevOps :-)
>> 
>> Locally, I'm using Vagrant and the CentOS 6.5 64-bit box with
>> Puppet 3.4.3 that was published by Puppetlabs, which should
>> somewhat mirror what's on the servers (a custom AMI based on
>> CentOS 6.5).
>> 
>> What I'm trying to do right now -- and I've found a bunch of ways
>> to do this -- is to setup a couple of repositories (EPEL and
>> MySQL Community being the most important ones). I've noticed that
>> people do this in a number of ways, from grabbing the RPM package
>> to using the 'yumrepo' type to adding a custom module for each
>> repo or by using a general purpose Yum module (like the one from
>> example42) and specifying the repos there.
>> 
>> Normally, when I install those repos, I download the RPM locally
>> and install it using the command line, for example:
>> 
>> yum install http://dev.mysql.com/get/ 
>> mysql-community-release-el6-5.noarch.rpm
>> 
>> That RPM will create a number of entries in the
>> /etc/yum.repos.d/, which seems odd to add each one by hand using
>> the `yumrepo` type.
>> 
>> I've seen this example given a number of times (it's also the
>> correct answer to a similar question on SO):
>> 
>> node default { include base }
>> 
>> class base { yumrepo { "IUS": baseurl =>
>> "http://dl.iuscommunity.org/pub/ius/stable/$ 
>> operatingsystem/$operatingsystemrelease/$architecture", descr =>
>> "IUS Community repository", enabled => 1, gpgcheck => 0 } }
>> 
>> Then, for any node that extends base you can say class foo { 
>> package { "bar": ensure => installed, require => Yumrepo["IUS"]
>> } }
>> 
>> Going back to the example with the MySQL Community RPM, I would
>> have to manually do this for three repos (the other two are
>> disabled):
>> 
>> * mysql-connectors-community * mysql-tools-community *
>> mysql56-community
>> 
>> Is this still the accepted solution in the Puppet community? If
>> so, how would you organize those repositories? Create a module
>> for each repository? Create a repository module with all the
>> sources?
>> 
>> And, somewhat related to this subject, I've noticed that I might
>> get some errors when provisioning my VMs because the base system
>> wasn't up to date. I was planning to add a `yum update` command
>> to my setup, but I realize that this might not be the best
>> solution because I might not want to update the base system
>> everytime I run puppet.
>> 
>> What's the best way to update the system only when running Puppet
>> for the first time?
>> 
>> Thanks, Max
>> 
>> 
>> -- 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/lpeenc%243ai%241%40ger.gmane.org. For more
>> options, visit https://groups.google.com/d/optout.
>> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTut2vAAoJEPh7fjCNYlpntCIH/3nT5kw7XLesDyUkP7fiE17H
gTl77/7bOHeJxHWWHeeTyzh5X/EjRYzl+sA/BasyLTMQjrAUFJc9ZP/ARFbOn1My
wuEBTpaeLzeH+pTMT6fER0vD0GsJVSnA2jasn5czT88Ql6PLGXfGhKJnI9NvKCe3
Ic5Hjuj+IKpTFMUQ+/ZznRdIKBiaMJ2+RLb/6kIFc/yYYoAMXZbMJMyeLhOwH1jK
iyKLMZjI98Bh2rz6mIZGK4Ey2f0r1QjqK/3wDiDMoERj/O+qM5vBRazxgSLXYra3
ewG0r7LQx8LNKgxSuKUMwYdTruPsZNMIm6o76cpFB6l2CuKlAQ9R4dK5rstUsng=
=r7Zl
-END PGP SIGNATURE-


[Puppet Users] Editing fstab with Augeas

2014-07-07 Thread Kim Scarborough
I'm trying to get Puppet to add "nosuid" to all my nfs or nfs4 mount 
entries in /etc/fstab. I'm currently using this:


   augeas { "fstab-nosuid":
  context => "/files/etc/fstab/*[vfstype = 'nfs' or vfstype = 
   'nfs4'][count(opt[. = 'nosuid']) = 0]",

  changes => [
  "ins opt after opt[last()]",
  "set opt[last()] nosuid"
  ],

  onlyif => "match /files/etc/fstab/*[vfstype = 'nfs' or 
   vfstype = 'nfs4'][count(opt[. = 'nosuid']) = 0] size > 0",
   }
   

This works, but it only edits a single line per run. How can I change it to 
do all of the relevant lines at once?

-- 
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/a3163d8a-ed0c-4472-b201-54dfd4b68d95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] My hiera entries parse incorrectly

2014-07-07 Thread Marc Whittaker
Thank you so much John,

As soon I read your comment the light went on...

On Monday, 7 July 2014 11:17:26 UTC-4, jcbollinger wrote:
>
>
>
> On Monday, July 7, 2014 9:18:07 AM UTC-5, Marc Whittaker wrote:
>>
>> Thanks for the suggestions Rich.
>>
>> I did try double quotes and the result if the same so still no progress.
>>
>>
>
> Yours is neither a single-quoted nor a double-quoted value.  It is an 
> unquoted value with a single quotes somewhere in the middle and at the 
> end.  In other words, the quotes are part of the data (which is apparently 
> intentional), not significant to the language syntax.  I think this would 
> work:
>
> - "marcstest1.password='Checking: This'"
>
>
> 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/fc9146a9-de79-43d3-b2a8-55e6ba0a4ebb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Windows warning about source permissions

2014-07-07 Thread Rob Reynolds
On Thu, Jul 3, 2014 at 4:44 PM, Michael Legleux  wrote:

> The directory already exists.
> Puppet master and agent are both 3.6.2
> This is in the debug from the run on the agent.
>
> Debug: Using settings: adding file resource 'pluginfactdest':
> 'File[C:/ProgramData/PuppetLabs/puppet/var/facts.d]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/facts.d",
> :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
>
>
> On Tuesday, July 1, 2014 7:53:34 PM UTC-7, Michael Legleux wrote:
>>
>> This warning is haunting me:
>>
>> Copying owner/mode/group from the source file on Windows is deprecated;
>> use source_permissions => ignore.
>>
>> It is referenced here:
>> http://docs.puppetlabs.com/windows/writing.html#managing-file-permissions
>>
>> I am not copying ANY files or anything yet, the site.pp is otherwise
>> blank. What files are PUPPET copying?
>> This folder is empty:
>> so I put this in site.pp
>> if $osfamily == 'windows' {
>> File { source_permissions => ignore } }
>> to no avail.
>>
>
Since this warning is coming from the puppet settings catalog[1] and not
the regular catalog, I don't believe this would be applied to those items.

[1]
https://github.com/puppetlabs/puppet/blob/master/docs/catalogs.md#settings-catalog


>> Must I just live with this warning? What gives?
>> Immediately after the warning it says
>> Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/facts.d]: Copying
>> owner from the source file on Windows is deprecated; user
>> source_permissions => ignore.
>> Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/facts.d]: Copying mode
>> from the source file on Windows is deprecated; user source_permissions =>
>> ignore.
>> Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/facts.d]: Copying
>> group from the source file on Windows is deprecated; user
>> source_permissions => ignore.
>>
>> C:/ProgramData/PuppetLabs/puppet/var/facts.d is empty!
>>
>
I'm a bit surprised to see this issue, unless there is some sort of sync
for external facts you are attempting from the master. With the directory
being empty it doesn't make sense though. It could be this is just a spot
where the setting wasn't applied in the settings catalog. It may be we need
to address it.



>
>>  --
> 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/e4a17a27-bb72-4be1-b085-72e100d12f72%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at PuppetConf 2014 , September
20-24 in San Francisco*
*Register by July 31st to take advantage of the Early Bird discount
 **--**save $249!*

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


[Puppet Users] Re: Package install from a URL

2014-07-07 Thread Jonathan Rose
I tried fiddling around with a puppet module I am writing to install RPM's 
both from repository as well as local resources (e.g. http) and tried the 
advise noted by David Caro, but I'm still getting error messages:

Skipping.
Error: Nothing to do
returned 1: Cannot open: 


On Tuesday, February 12, 2013 4:35:08 AM UTC-5, David Caro wrote:
>
>
> As I've seen in the code, th eyum provider passes the name of the package 
> to yum, so instead of using source you should use name:
>
> class yum::repos::puppetlabs {
>   package { 'puppetlabs-release':
> ensure => installed,
> name => '
> http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-5.noarch.rpm
> ',
>   }
> }
>
> that should work.
>
>
> On Monday, September 3, 2012 2:26:30 PM UTC+2, matonb wrote:
>>
>> puppet-server 2.7.19 on CentOS 6.3 x64
>>  
>> I have the follow very bsaic class, which I would expect to install the 
>> package if it's not already  present on the system:
>>  
>> class yum::repos::puppetlabs {
>>   package { 'puppetlabs-release':
>> ensure => installed,
>> source => '
>> http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-5.noarch.rpm
>> ',
>>   }
>> }
>> It doesn't appear to use the source value, simply the package name in the 
>> yum command:
>>  
>> err: /Stage[main]/Yum::Repos::Puppetlabs/Package[puppetlabs-release]/
>> ensure: change from absent to present failed:
>> Execution of '/usr/bin/yum -d 0 -e 0 -y install puppetlabs-release' 
>> returned 1: Error: Nothing to do
>>  
>> If I manually install with
>>  yum install 
>> http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-5.noarch.rpm
>>  
>> It works just fine.
>>  
>> Any help appreciated.
>>
>

-- 
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/4bd5e900-ff49-44f1-98ad-4529c46e0367%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Editing fstab with Augeas

2014-07-07 Thread Pete Brown
Is there a reason you aren't using the builtin mount type?
I believe it can do everything you require.

http://docs.puppetlabs.com/references/stable/type.html#mount

On 8 July 2014 04:42, Kim Scarborough  wrote:
> I'm trying to get Puppet to add "nosuid" to all my nfs or nfs4 mount entries
> in /etc/fstab. I'm currently using this:
>
> augeas { "fstab-nosuid":
>context => "/files/etc/fstab/*[vfstype = 'nfs' or vfstype =
> 'nfs4'][count(opt[. = 'nosuid']) = 0]",
>
>changes => [
>"ins opt after opt[last()]",
>"set opt[last()] nosuid"
>],
>
>onlyif => "match /files/etc/fstab/*[vfstype = 'nfs' or vfstype =
> 'nfs4'][count(opt[. = 'nosuid']) = 0] size > 0",
> }
>
>
> This works, but it only edits a single line per run. How can I change it to
> do all of the relevant lines at once?
>
> --
> 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/a3163d8a-ed0c-4472-b201-54dfd4b68d95%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/CAJ8DPF6qChiFDADbp5L%3DA3tkUvzHQ49Y7vLnxPdSfzBdgWi8vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.