you can use notify for a Exec and use a exec { 'fix permission':
command
=> 'chmod 0755 /app_dir ; chown root:root /app_dir'
}
something like that, I didn't test but I guess that you work :D
On Friday, March 21, 2014 1:41:25 PM UTC-3, Paolo wrote:
>
> Hi
>
> I have the following problem: in a certain module I need to set
> permissions on a directory after the mount was executed. If I do the
> following
>
> file { '/app_dir':
> ensure => 'directory'
> owner => 'app_user'
> group => 'app_group'
> mode => '2775'
> } mount { '/app_dir':
> ensure => mounted,
> atboot => true,
> device => /dev/mapper/lv_app,
> fstype => ext3,
> options => 'defaults',
> dump => '1',
> pass => '2',
> require => File['/app_dir'],
> }
>
> This would require 2 rounds of puppet: round 1 to setup directory, mount
> the filesystem and round 2 to fix permissions set to root:root,0755 by the
> mount command...
>
> In looking for a solution I found the following link:
> https://projects.puppetlabs.com/issues/4815 that asks for the option to
> add permission settings to mount resource. The request was rejected and in
> the comments
> Eric Sorenson writes that it would be trivial to accomplish with a
> defined type, but without going into details... :-( Can any one give me
> some details on how to do it with a defined type?
>
>
>
> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/bc2954ad-6c52-4772-8f67-a22d98d81c56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.