Re: [Puppet Users] are read-only type attributes usable?

2009-11-25 Thread Andrew Schulman
 Thanks for the docs update - the TypeReference is auto-generated from
 the Puppet source so I deleted your update from the current wiki and
 committed it into the relevant section of the code.

When will the wiki page be regenerated?  So far it hasn't been, so my edits
have vanished.  Thanks, Andrew.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-25 Thread Peter Meier
 Thanks for the docs update - the TypeReference is auto-generated from
 the Puppet source so I deleted your update from the current wiki and
 committed it into the relevant section of the code.

 When will the wiki page be regenerated?  So far it hasn't been, so my edits
 have vanished.  Thanks, Andrew.

I assume more or less automatically after  
http://projects.reductivelabs.com/issues/2857 have been merged.

cheers pete

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-25 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew Schulman wrote:
 Thanks for the docs update - the TypeReference is auto-generated from
 the Puppet source so I deleted your update from the current wiki and
 committed it into the relevant section of the code.
 
 When will the wiki page be regenerated?  So far it hasn't been, so my edits
 have vanished.  Thanks, Andrew.
 

They are generally regenerated when we release - so it'll be at the
release 0.25.2.

But your changes should be there I must have saved the old version -
fixed now.

Regards

James Turnbull

- --
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJLDZ4bAAoJECFa/lDkFHAydWkH/1o7em2IEAvUTSQZPVwCTjEK
VNV8VK06TFZ3vtMLGiB0nrxoiOLNk8RTxVAAEw5+CAFWqvJRDUYhEBD1afXvNejE
VZleZ13qD+gc8nUYr7bF/7vDt+TiLbmRnoIWnCS8+8DfHt1caPcq0SUUGXgUyhYt
nbZ2rQwCF283HY8MYHsBn8jMusEX1+5HsvPP86hsSYSHOHFjVZbr5/1auMpj4BQx
H5eOa5efi/XGFrjYj6HuYkxAqeYwb7z5SlGQGeSVvMgP0qCyXq6x7ZW94aYxJDKs
y/KbpbPN8DOdRUka4NmQpdHoRdtqlBo9YWq5gAAhmbTQexi00xbR4j3kSzl0YMI=
=2u65
-END PGP SIGNATURE-

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-24 Thread Andrew Schulman
 The Type Reference lists 8 read-only type attributes, but I can't find any
 information in the documentation about how to use them.  Are they usable,
 and if so how?

Any answer to this question?  If read-only attributes are only for internal
use in Puppet, it would be helpful to say that in the docs.  Thanks,
Andrew.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-24 Thread Andrew Schulman
 On Thu, Nov 19, 2009 at 11:52 AM, Andrew Schulman 
 google-groups-and...@sneakemail.com wrote:
 
  The Type Reference lists 8 read-only type attributes, but I can't find any
  information in the documentation about how to use them.  Are they usable,
  and if so how?
 
  Here's my #1 example:  when I set the mode on a file resource, I want to
  set a different default mode for a file than for a directory.  Files have
  an attribute named type, which the docs say is a read-only state to check
  the file type.  That would seem to be the right thing, so I want to write
  something like
 
 
 
 that doesnt exactly work as you described it. As a feature, if you set up
 default mode as 644, puppet assumes that you want 755 on dirs and not 644.

I've tested this and it's true, so I've added an explanation of it in the
docs.  It's pretty important to know... I wondered for a long time how to
do this.  Thanks, Andrew.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-24 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew Schulman wrote:
 that doesnt exactly work as you described it. As a feature, if you set up
 default mode as 644, puppet assumes that you want 755 on dirs and not 644.
 
 I've tested this and it's true, so I've added an explanation of it in the
 docs.  It's pretty important to know... I wondered for a long time how to
 do this.  Thanks, Andrew.

Andrew

Thanks for the docs update - the TypeReference is auto-generated from
the Puppet source so I deleted your update from the current wiki and
committed it into the relevant section of the code.

Regards

James Turnbull

- --
Author of:
* Pro Linux System Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEbBAEBAgAGBQJLDHN1AAoJECFa/lDkFHAyf1sH+NjzAYdgUAfe5sHd5OO6WS1A
Q+Yud4RN4Ji228yvexDA8WzNdeBgCbZurZAik2luB8kr/hPBBxabbc37a2+l/zbS
YLCyoQ4yKTB6va+XwBj4yMR5WYIkK8naRpPmLdzAfCS57P6b1SAtYw9R9mwhwZIe
odWQineFB+NIVoafOuqlt/OCBuZh6GGQU7FfMsx5QFSHWeztFJZAtwrgF70paBwf
Pzn01yW44bKarX+sTFHls4wKZlaVRsQay11SY4Eg8xa/ve/6Ph5jxdoOBren1sQB
LmnQ04b42aFRkHYkp/7h1+i2v4uQ/94kZl88iS+W+tjrFgoTkf+rpzuQL/lmKA==
=Wzhr
-END PGP SIGNATURE-

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-24 Thread Andrew Schulman
 Andrew Schulman wrote:
  that doesnt exactly work as you described it. As a feature, if you set up
  default mode as 644, puppet assumes that you want 755 on dirs and not 644.
  
  I've tested this and it's true, so I've added an explanation of it in the
  docs.  It's pretty important to know... I wondered for a long time how to
  do this.  Thanks, Andrew.
 
 Andrew
 
 Thanks for the docs update - the TypeReference is auto-generated from
 the Puppet source so I deleted your update from the current wiki and
 committed it into the relevant section of the code.

Ah-- okay, thanks

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-20 Thread Andrew Schulman
 As a feature, if you set up
 default mode as 644, puppet assumes that you want 755 on dirs and not 644.

Is that documented anywhere?  I've never seen it.

That still leaves my question unanswered, though.

Thanks,
Andrew.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-20 Thread Andrew Schulman
 On Thu, Nov 19, 2009 at 3:53 PM, Dan Bode d...@reductivelabs.com wrote:
  On Thu, Nov 19, 2009 at 11:52 AM, Andrew Schulman
  google-groups-and...@sneakemail.com wrote:
 
  The Type Reference lists 8 read-only type attributes, but I can't find any
  information in the documentation about how to use them.  Are they usable,
  and if so how?
 
  Here's my #1 example:  when I set the mode on a file resource, I want to
  set a different default mode for a file than for a directory.  Files have
  an attribute named type, which the docs say is a read-only state to check
  the file type.  That would seem to be the right thing, so I want to write
  something like
 
 
 
  that doesnt exactly work as you described it. As a feature, if you set up
  default mode as 644, puppet assumes that you want 755 on dirs and not 644.
 
 Really? That just seems like a horrible feature.

Actually I think it's the right thing to do.  There's apparently no way at
present to tell Puppet how to handle files and directories differently when
recurse is true, so there needs to be a reasonable default.  Yes, it is possible
to want a directory to be readable but not executable, but by far the more
common case is to want either both or neither.

So I hope that Puppet's rule is:  when recurse is true, anywhere the read (4)
bit is on in the mode setting, add the execute (1) bit to directories.

Whatever the rule is, it needs to be documented under file.mode.

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-20 Thread Peter Meier

Really? That just seems like a horrible feature.


Actually I think it's the right thing to do.  There's apparently no way at
present to tell Puppet how to handle files and directories differently when
recurse is true, so there needs to be a reasonable default.  Yes, it  
is possible

to want a directory to be readable but not executable, but by far the more
common case is to want either both or neither.

So I hope that Puppet's rule is:  when recurse is true, anywhere  
the read (4)

bit is on in the mode setting, add the execute (1) bit to directories.

Whatever the rule is, it needs to be documented under file.mode.


there have been some discussion about that on the list recently, as  
well there should be a feature request to give the possiblility to let  
act file without all that magic to be able to set a directory to  
read-only but not executable.


cheers pete


pgpM9CHaWSJmJ.pgp
Description: PGP Digital Signature


Re: [Puppet Users] are read-only type attributes usable?

2009-11-19 Thread Dan Bode
On Thu, Nov 19, 2009 at 11:52 AM, Andrew Schulman 
google-groups-and...@sneakemail.com wrote:

 The Type Reference lists 8 read-only type attributes, but I can't find any
 information in the documentation about how to use them.  Are they usable,
 and if so how?

 Here's my #1 example:  when I set the mode on a file resource, I want to
 set a different default mode for a file than for a directory.  Files have
 an attribute named type, which the docs say is a read-only state to check
 the file type.  That would seem to be the right thing, so I want to write
 something like



that doesnt exactly work as you described it. As a feature, if you set up
default mode as 644, puppet assumes that you want 755 on dirs and not 644.


 file { mode = $type ? { file = 0644, directory = 0755 } }

 But that isn't right of course, since $type is a facter fact, unrelated to
 the file's type attribute.  So is the type attribute available for me to
 use, and if so how?

 Thanks,
 Andrew.

 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=.




--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=.




Re: [Puppet Users] are read-only type attributes usable?

2009-11-19 Thread Nigel Kersten
On Thu, Nov 19, 2009 at 3:53 PM, Dan Bode d...@reductivelabs.com wrote:
 On Thu, Nov 19, 2009 at 11:52 AM, Andrew Schulman
 google-groups-and...@sneakemail.com wrote:

 The Type Reference lists 8 read-only type attributes, but I can't find any
 information in the documentation about how to use them.  Are they usable,
 and if so how?

 Here's my #1 example:  when I set the mode on a file resource, I want to
 set a different default mode for a file than for a directory.  Files have
 an attribute named type, which the docs say is a read-only state to check
 the file type.  That would seem to be the right thing, so I want to write
 something like



 that doesnt exactly work as you described it. As a feature, if you set up
 default mode as 644, puppet assumes that you want 755 on dirs and not 644.

Really? That just seems like a horrible feature.





 file { mode = $type ? { file = 0644, directory = 0755 } }

 But that isn't right of course, since $type is a facter fact, unrelated to
 the file's type attribute.  So is the type attribute available for me to
 use, and if so how?

 Thanks,
 Andrew.

 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=.



 --

 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-us...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=.




-- 
nigel

--

You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=.