hi all: if we need to ensure a file exist in a folder that not yet been created. puppet will simplely report error. for example: file { "/aaa/bbb/ccc/aaa" ensure => ''present''; } if directory ccc not yet been created, puppet client excute will get an error message. Does puppet have any function to auto mkdir -p this path an make sure the file exist? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jeffrey Watts
2011-Dec-20 18:35 UTC
Re: [Puppet Users] a question about ensure file exists
Any reason you can''t do the following? file { "/aaa/bbb/ccc" ensure => ''directory'', } Jeffrey. On Thu, Dec 15, 2011 at 9:43 PM, chateau Xiao <chateau.xiao@gmail.com>wrote:> hi all: > if we need to ensure a file exist in a folder that not yet been created. > puppet will simplely report error. > for example: > > file { "/aaa/bbb/ccc/aaa" > ensure => ''present''; > } > > if directory ccc not yet been created, puppet client excute will get an > error message. > Does puppet have any function to auto mkdir -p this path an make sure the > file exist? > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.