Re: [Puppet Users] Re: mount point directory permissions

2014-03-23 Thread Dirk Heinrichs
Am 23.03.2014 09:57, schrieb Stefan Schulte:
> That's what I'd do, too. But you can use `creates` paramter to do the
> check, there is no need to invoke an external command.
>
> exec { 'create_mntpoint_/mnt/foo':
>   command => '/bin/mkdir -m 0755 /mnt/foo',
>   creates => '/mnt/foo',
> }

But that's not the OP's problem. Creating the mount point can be
perfectly accomplished with a file resource. The problem is to adjust
permissions AFTER mounting something there w/o having to wait for the
next agent run.

If the permissions of the mount point and the mounted directory are
different, that would lead to a permission change ping-pong, unless one
leaves the permission and ownership attributes of the mount point file
resource untouched and uses an exec with appropriate conditions and
"refreshonly=>true", triggered by the mount resource.

HTH...

Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 159 (Ansage) 1149
*Email*: d...@recommind.com 
*Skype*: dirk.heinrichs.recommind
www.recommind.com 



http://www.recommind.com

-- 
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/532FD65E.5000402%40recommind.com.
For more options, visit https://groups.google.com/d/optout.
<>

[Puppet Users] hash of arrays to call a define

2014-03-23 Thread backgroaned
Given this hash of arrays:

$players = {
  'joe' => [
'150',
'200',
  ],
  'janet' => 
'120',
'240',
  ],
}

... and given a define that's like this: 

profile::generate {$player:
  source => "puppet:///modules/$module_name/$player"
}

... how do you call profile::generater without hardcoding 2 defines? 

   

-- 
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/35644b5a-e4e8-4ff8-ad3e-dbfd504116d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Literal URIs in templates

2014-03-23 Thread Grant Byers
Scrap that. I'm an idiot.



On 24 March 2014 10:29, Grant Byers  wrote:

> Hi,
>
> I'm having some trouble using a template to construct URIs in a target
> file. How can I prevent the puppet templating engine from trying to
> interpret the URIs?
>
> For example, I've got the following class ;
>
> class ldap::config {
>   $ldap_sizelimit = extlookup("ldap_sizelimit", "500")
>   $ldap_timelimit = extlookup("ldap_timelimit", "15")
>   $ldap_deref = extlookup("ldap_deref", "never")
>   $ldap_uri = extlookup("ldap_uri", "ldap:// ldap://
> ldap://")
>   $ldap_basedn = extlookup("")
>   $ldap_referrals = extlookup("ldap_referrals", "off")
>
>   file { '/etc/openldap/ldap.conf':
> ensure  => file,
> source  => template('ldap/ldap.conf.erb'),
> require => Class["ldap::install"],
>   }
> }
>
> And my template ;
>
> #
> # LDAP Defaults
> #
>
> # See ldap.conf(5) for details
> # This file should be world readable but not world writable.
>
> SIZELIMIT   <%= @ldap_sizelimit %>
> TIMELIMIT   <%= @ldap_timelimit %>
>
> REFERRALS   <%= @ldap_referrals %>
> DEREF   <%= @ldap_deref %>
>
> URI <%= @ldap_uri %>
> BASE<%= @ldap_basedn %>
>
> TLS_CACERTDIR   /etc/pki/tls/certs
>
>
> However, this barfs when I attempt to apply ;
>
> err: Failed to apply catalog: Parameter source failed on
> File[/etc/openldap/ldap.conf]: Could not understand source #
> # LDAP Defaults
> #
>
> # See ldap.conf(5) for details
> # This file should be world readable but not world writable.
>
> SIZELIMIT   500
> TIMELIMIT   15
>
> REFERRALS   off
> DEREF   never
>
> URI ldap:// ldap:// ldap://
> BASE
>
> TLS_CACERTDIR   /etc/pki/tls/certs
> : bad URI(is not URI?):
> %23%0A%23%20LDAP%20Defaults%0A%23%0A%0A%23%20See%20ldap.conf(5)%20for%20details%0A%23%20This%20file%20should%20be%20world%20readable%20but%20not%20world%20writable.%0A%0ASIZELIMIT%09500%0ATIMELIMIT%0915%0A%0AREFERRALS%09off%0ADEREF%09%09never%0A%0AURI%09%09ldap://%20ldap://%20ldap://%0ABASE%20%09%09%0A%0ATLS_CACERTDIR%09/etc/pki/tls/certs%0A
> at /etc/puppet/environments/testing/modules/ldap/manifests/config.pp:16
>
>
> Thanks,
> Grant
>

-- 
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/CANJMdcZ04uA4RZazikSWcBW-Da-Vu7wsp%2BvyQus54xBhii%3DrKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Literal URIs in templates

2014-03-23 Thread Grant Byers
Hi,

I'm having some trouble using a template to construct URIs in a target
file. How can I prevent the puppet templating engine from trying to
interpret the URIs?

For example, I've got the following class ;

class ldap::config {
  $ldap_sizelimit = extlookup("ldap_sizelimit", "500")
  $ldap_timelimit = extlookup("ldap_timelimit", "15")
  $ldap_deref = extlookup("ldap_deref", "never")
  $ldap_uri = extlookup("ldap_uri", "ldap:// ldap://
ldap://")
  $ldap_basedn = extlookup("")
  $ldap_referrals = extlookup("ldap_referrals", "off")

  file { '/etc/openldap/ldap.conf':
ensure  => file,
source  => template('ldap/ldap.conf.erb'),
require => Class["ldap::install"],
  }
}

And my template ;

#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

SIZELIMIT   <%= @ldap_sizelimit %>
TIMELIMIT   <%= @ldap_timelimit %>

REFERRALS   <%= @ldap_referrals %>
DEREF   <%= @ldap_deref %>

URI <%= @ldap_uri %>
BASE<%= @ldap_basedn %>

TLS_CACERTDIR   /etc/pki/tls/certs


However, this barfs when I attempt to apply ;

err: Failed to apply catalog: Parameter source failed on
File[/etc/openldap/ldap.conf]: Could not understand source #
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

SIZELIMIT   500
TIMELIMIT   15

REFERRALS   off
DEREF   never

URI ldap:// ldap:// ldap://
BASE

TLS_CACERTDIR   /etc/pki/tls/certs
: bad URI(is not URI?):
%23%0A%23%20LDAP%20Defaults%0A%23%0A%0A%23%20See%20ldap.conf(5)%20for%20details%0A%23%20This%20file%20should%20be%20world%20readable%20but%20not%20world%20writable.%0A%0ASIZELIMIT%09500%0ATIMELIMIT%0915%0A%0AREFERRALS%09off%0ADEREF%09%09never%0A%0AURI%09%09ldap://%20ldap://%20ldap://%0ABASE%20%09%09%0A%0ATLS_CACERTDIR%09/etc/pki/tls/certs%0A
at /etc/puppet/environments/testing/modules/ldap/manifests/config.pp:16


Thanks,
Grant

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


[Puppet Users] External CA - Proper Support for Certificate Chaining

2014-03-23 Thread Axton
I am using puppet agent 3.4.3 and still see this as an issue.  I found
these tickets in the old tracking system related to my intended objectives:
* https://projects.puppetlabs.com/issues/3143
  https://projects.puppetlabs.com/issues/3770
  https://projects.puppetlabs.com/issues/14550
  https://projects.puppetlabs.com/issues/15404

I have not found any similar tickets in JIRA and would like to know if
interest was lost in this capability or if it was addressed and I am
missing something with my configuration.  I opted to configure "Option 3:
Two Intermediate CAs Issued by One Root CA" as outlined at
http://docs.puppetlabs.com/puppet/latest/reference/config_ssl_external_ca.html#option-3-two-intermediate-cas-issued-by-one-root-ca
.

I can get everything working properly by setting the following in
puppet.conf on each agent:
  certificate_revocation = false

I would rather leave that at the default, true, but it appears this is not
possible at this time.

According to
http://docs.puppetlabs.com/references/latest/configuration.html#certificaterevocation,
this appears to be a known limitation.
  certificate_revocation
  Whether certificate revocation should be supported by downloading a
Certificate Revocation List (CRL) to all clients. If enabled, CA chaining
will almost definitely not work.
  Default: true

The documentation on using an external CA makes no reference to this
limitation and even claims that CRL's are supported with all 3 external CA
configurations.  See
http://docs.puppetlabs.com/puppet/latest/reference/config_ssl_external_ca.html#revocation
  "Certificate revocation list (CRL) checking works in all three supported
configurations, so long as the CRL file is distributed to the agents and
masters using an “out of band” process. Puppet won’t automatically update
the CRL on any of the components in the system."

This statement is false with option 3.  The nice thing about option 3 is
that is prevents agent certificates from being used to act as a master.
 With some name resolution trickery someone could cause havoc if they have
certificates that allow an arbitrary machine to act as a puppet master.

There have been multiple approaches proposed to work around this limitation
in the product:
  - OCSP support, negating the need to support CRLs, though this would only
solve the problem for CA's that support OCSP
  - CRL directory (versus file) support, comparable to
Apache's SSLCARevocationPath

Curious where this stands.

Thanks,
Axton Grams

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


Re: [Puppet Users] Comparing pathes in puppet

2014-03-23 Thread Garrett Honeycutt
On 3/21/14, 1:23 PM, Roman Alekseev wrote:
> Hello,
> 
> I have two variables:
> $a = some_path
> $b = othe_path
> and truing to compare it
> 
> if $a != $b { do something }
> but always these variables are not equal for puppet.
> In my case it can be equal, for example
> $a = /var/cache/nginx/proxy_temp
> $b = /var/cache/nginx/proxy_temp
> 
> How can it be fixed?

Hi Roman,

String comparison definitely works in Puppet. Perhaps your variables are
not what you think they are. Here's an example to help you debug the issue.

notify { "a = <${a}>": }
notify { "b = <${b}>": }

If they look the same, you might have a difference in type. '/foo' !=
['/foo'].

You can use the following to help you debug further.

$type_a = type($a)
$type_b = type($b)

notify { "type_a = <${type_a}>": }
notify { "type_b = <${type_b}>": }

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/532F4BA2.5040607%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] HP-UX Puppet Init Script !!

2014-03-23 Thread Garrett Honeycutt
On 3/22/14, 5:33 PM, Rakesh Kathpal wrote:
> Hi,
> 
> 
> I have been successfully able to install puppet on hu-ux, all I am
> looking is to run puppet agent from this server.
> 
> Can someone please help me with the init script for puppet agent on HP-UX ??
> 
> It would be great if you have one, else if you can point me to the
> correct directions for creating one.
> 
> Thanks,
> 
> Rakesh K

Hi Rakesh,

Might I suggest not running puppet as a service at all and instead
running it from cron. Doing so provides some more flexibility and helps
protect against memory leaks.

My module[1] for managing puppet would likely work for you with minimal
modification. Would be glad to work with you on it to support HP-UX.

[1] - https://github.com/ghoneycutt/puppet-module-puppet

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/532F47D6.5000206%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Powershell error 80040154, import-module, set-webconfigurationproperty

2014-03-23 Thread krish
Just a hunch Windows 2008 R2 is 64 bit...
http://docs.puppetlabs.com/windows/running.html#file-system-redirection-in-64-bit-windows-versions

and another small check... wondering if puppet run is invoking a
case-sensitive powershell? (less likely though)






On Sun, Mar 23, 2014 at 8:31 PM, Choon Ming Goh wrote:

> Hi all,
>
> I'm currently trying to set some web configuration properties through
> powershell using puppet but it is throwing me error. If I were to run the
> commands directly on the powershell it works. I'm running this on a Windows
> 2008 R2 server with WebServerRole. Please enlighten
>
>   exec { 'SEMS disable Basis Authentication':
> command => 'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
> -executionpolicy unrestricted -Command "Import-Module WebAdministration;
> Set-WebConfigurationProperty -filter
> /system.webServer/security/authentication/AnonymousAuthentication -name
> enabled -location SEMS -value false"',
>   }
>
> Notice: Compiled catalog for win-uej5ngs6bua.docomointertouch.net in
> environment production in 1.80 seconds
> Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns: Set-WebConfigurationProperty : Retrieving the COM
> class factory for component with CLSID
> {6885-6A7E-422F-BE1-6AF00DC944A6} failed due to the following error:
> 80040154.
> Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns: At line:1 char:62
> Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns: + Import-Module WebAdministration;
> Set-WebConfigurationProperty   -filter
> /system.webServer/security/authentication/AnonymousAuthentication -name
> enabled -location SEMS -value false
> Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns: + CategoryInfo  : NotSpecified: (:)
> [Set-WebConfigurationProperty], COMException
> Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns: + FullyQualifiedErrorId :
> System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand
> Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns:
> Error: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
> -executionpolicy unrestricted -Command "Import-Module WebAdministration;
> Set-WebConfigurationProperty -filter
> /system.webServer/security/authentication/AnonymousAuthentication -name
> enabled -location SEMS -value false" returned 1 instead of one of [0]
> Error: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis
> Authentication]/returns: change from notrun to 0 failed:
> C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -executionpolicy
> unrestricted -Command "Import-Module WebAdministration;
> Set-WebConfigurationProperty -filter
> /system.webServer/security/authentication/AnonymousAuthentication -name
> enabled -location SEMS -value false" returned 1 instead of one of [0]
>
>  --
> 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/91f6c261-4a10-42bd-a428-83e0e20c71bc%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Have a Power-Up Day!
--
*Krish*
I lives in a cave(facebook.com/toonheart) nd writes me games.
DOWNLOAD Hoppu Now on Blackberry!
http://appworld.blackberry.com/webstore/content/49832892/

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


Re: [Puppet Users] Re: Problems in Ch. 1 and 2 of Pro Puppet 2nd Edition

2014-03-23 Thread Julien Deloubes
Some of them are very annoying for someone who is juste beginning learning 
Puppet (and who won't accused the book but instead herself for doesn't 
understand)
Chapter 2 is in my  opinion the most important chapter because it teaches 
to write puppet code, so it had to be reviewed a lot, which doesn't seem to 
be the case.
Thanks to us PuppetLabs has excellent documentation on their website, and 
despite its typos this is still the best book on the subject (i'm agree 
with you concerning Packt, i bought the Puppet 3 cookbook and want my money 
back!).
Will send report to Apress too.
Thanks.

Le dimanche 23 mars 2014 02:03:40 UTC+1, Jon Forrest a écrit :
>
> On 3/22/2014 4:03 PM, Julien Deloubes wrote: 
> > Hi John, 
> > thanks for your work. 
> > I think i found another typo or maybe there is something i don't 
> understand? 
> > 
> > (T) Pg. 51 "file { ::$ssh::params::ssh_service_config:" -> 
> > "file { $::ssh::params::ssh_service_config:" 
>
> Very good find. I missed that one. I've added it to my master list, 
> credited to you, which I'll be putting on Dropbox when it's finished. 
>
> Submitting errors to Apress is also a good idea, although it isn't clear 
> if it will do any good. After all, the Errata page for Pro Puppet 
> 2nd ed. is still empty, even after everything I've posted. 
>
> Jon 
>
>
>
>

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


[Puppet Users] Powershell error 80040154, import-module, set-webconfigurationproperty

2014-03-23 Thread Choon Ming Goh
Hi all,

I'm currently trying to set some web configuration properties through 
powershell using puppet but it is throwing me error. If I were to run the 
commands directly on the powershell it works. I'm running this on a Windows 
2008 R2 server with WebServerRole. Please enlighten

  exec { 'SEMS disable Basis Authentication':
command => 'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe 
-executionpolicy unrestricted -Command "Import-Module WebAdministration; 
Set-WebConfigurationProperty -filter 
/system.webServer/security/authentication/AnonymousAuthentication -name 
enabled -location SEMS -value false"',
  }

Notice: Compiled catalog for win-uej5ngs6bua.docomointertouch.net in 
environment production in 1.80 seconds
Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns: Set-WebConfigurationProperty : Retrieving the COM 
class factory for component with CLSID 
{6885-6A7E-422F-BE1-6AF00DC944A6} failed due to the following error: 
80040154.
Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns: At line:1 char:62
Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns: + Import-Module WebAdministration; 
Set-WebConfigurationProperty   -filter 
/system.webServer/security/authentication/AnonymousAuthentication -name 
enabled -location SEMS -value false
Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns: + CategoryInfo  : NotSpecified: (:) 
[Set-WebConfigurationProperty], COMException
Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns: + FullyQualifiedErrorId : 
System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand
Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns:
Error: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe 
-executionpolicy unrestricted -Command "Import-Module WebAdministration; 
Set-WebConfigurationProperty -filter 
/system.webServer/security/authentication/AnonymousAuthentication -name 
enabled -location SEMS -value false" returned 1 instead of one of [0]
Error: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis 
Authentication]/returns: change from notrun to 0 failed: 
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -executionpolicy 
unrestricted -Command "Import-Module WebAdministration; 
Set-WebConfigurationProperty -filter 
/system.webServer/security/authentication/AnonymousAuthentication -name 
enabled -location SEMS -value false" returned 1 instead of one of [0] 

-- 
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/91f6c261-4a10-42bd-a428-83e0e20c71bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: mount point directory permissions

2014-03-23 Thread José Luis Ledesma
A lot cleaner!

Always used creates for unzipping, didn't though about using it for mkdir

Thanks!
El 23/03/2014 09:56, "Stefan Schulte" 
escribió:

> On 21.03.2014 19:53, José Luis Ledesma wrote:
> > I prefer the exec resource to create the mount point ( with onlyif !
> > Test-d mountpoint) and the file resource to set the proper permissions.
> >
> > Regards,
>
> That's what I'd do, too. But you can use `creates` paramter to do the
> check, there is no need to invoke an external command.
>
> exec { 'create_mntpoint_/mnt/foo':
>   command => '/bin/mkdir -m 0755 /mnt/foo',
>   creates => '/mnt/foo',
> }
>
> -Stefan
>
> --
> 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/532EA212.3060008%40taunusstein.net
> .
> 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/CAF_B3dfVkXS62kncUenVvMF9vPWizCfwv8AX%3DO8QH6Uz%2BOvHdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: mount point directory permissions

2014-03-23 Thread Stefan Schulte
On 21.03.2014 19:53, José Luis Ledesma wrote:
> I prefer the exec resource to create the mount point ( with onlyif !
> Test-d mountpoint) and the file resource to set the proper permissions.
> 
> Regards,

That's what I'd do, too. But you can use `creates` paramter to do the
check, there is no need to invoke an external command.

exec { 'create_mntpoint_/mnt/foo':
  command => '/bin/mkdir -m 0755 /mnt/foo',
  creates => '/mnt/foo',
}

-Stefan

-- 
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/532EA212.3060008%40taunusstein.net.
For more options, visit https://groups.google.com/d/optout.