Re: [Puppet Users] Re: Passing special characters to exec's command - syntax help!!

2012-08-14 Thread earthgecko
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,

Re: [Puppet Users] Re: Passing special characters to exec's command - syntax help!!

2012-08-14 Thread Julia Smith
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

[Puppet Users] Re: Passing special characters to exec's command - syntax help!!

2012-08-14 Thread earthgecko
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

[Puppet Users] Re: Passing special characters to exec's command - syntax help!!

2012-08-14 Thread earthgecko
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