OK then.
command => "mkdir -p $(dirname ${home})",
That does it.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/1LLoBIiTMZ4J.
To post to this group,
Hi
Thanks for your response.
The first answer won't work for me as I want to be dynamic about it and
take in a variable of the full path so it could just as easily be 10
directories deep. I'm getting the value for home from a CLI rather than
hand crafting something static.
The significance of the
So as a variable I get passed in $home and it may be for example
> /first/second/userdirectory where first and second may not exist.
>
> So I wanted to do a simple exec command which does the following if I were
> to do it at the command line:
>
> mkdir -p ${home%/*}
>
> ...this would make /fi
There are a number of ways to achieve that.
One would be to.
file { [ '/first', '/first/second' ]:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
before => User['julia'],
}
user { 'juila':
ensure => present,
gid => 'julia',
groups=> ['u