Thijs Oppermann wrote:> Hi all,
>
> Is there maybe an undocumented parameter with which to tell puppet to
> create missing parent directories when using the ''file''
type? And if
> not, should there be?
>
> I actually expected it to be default behaviour to create missing
> parent directories when doing something like:
>
> {{{
>
> file { "/usr/local/svn/repos":
> ensure => directory,
> owner => root
> }
>
> }}}
>
> in the case where /usr/local/svn does not yet exist?
>
> Now I find myself just creating an ''exec'' with the
following,
> bypassing the builtin ''file'' type, because it
doesn''t do what I
> expect:
>
> {{{
>
> exec { "mkdir -p /usr/local/svn/repos":
> path => "/bin:/usr/bin",
> user => root
> }
>
> }}}
>
> It works, of course, but I thought the idea was to try to use the
> builtin types as much as possible.
>
> Am I looking at this the wrong way? Maybe there are other
> considerations I haven''t yet thought of. Any comment appreciated.
I haven''t figured out a good way to recursively create parent
directories; this is probably as good as any.
Maybe I''ll take another stab at this for 0.20, but...
--
"They called me mad, and I called them mad, and damn them, they
outvoted me."
-- Nathaniel Lee on being consigned to a mental institution,
circa 17th c.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com