As they said it should work. [1]. Try with setting mode also as mentioned in [1].
[1] http://projects.puppetlabs.com/issues/86 *Harsha Thirimanna* Senior Software Engineer; WSO2, Inc.; http://wso2.com * <http://www.apache.org/>* *email: **[email protected]* <[email protected]>* cell: +94 71 5186770 , +94 * *774617784twitter: **http://twitter.com/ <http://twitter.com/afkham_azeez>* *harshathirimannlinked-in: **http: <http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122 <http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>* *Lean . Enterprise . Middleware* On Tue, Jan 6, 2015 at 11:27 AM, Suhan Dharmasuriya <[email protected]> wrote: > Hi Harsha, > > Yes, I tried. It failed. > > root@elb-1:~# puppet agent -t > Info: Retrieving plugin > Info: Loading facts in /var/lib/puppet/lib/facter/java_home.rb > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Invalid parameter create_parents at /etc/puppet/manifests/site.pp:31 on > node elb-1.openstacklocal > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > I think they have not yet implemented it, isn't it? > > On Tue, Jan 6, 2015 at 11:22 AM, Harsha Thirimanna <[email protected]> > wrote: > >> Did you try this , >> >> file{“/some/very/deep/path”: ensure => directory, owner => ‘root’, >> create_parents => true } >> >> >> *Harsha Thirimanna* >> Senior Software Engineer; WSO2, Inc.; http://wso2.com >> * <http://www.apache.org/>* >> *email: **[email protected]* <[email protected]>* cell: +94 71 5186770 , >> +94 * >> *774617784twitter: **http://twitter.com/ >> <http://twitter.com/afkham_azeez>* >> *harshathirimannlinked-in: **http: >> <http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122 >> <http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>* >> >> *Lean . Enterprise . Middleware* >> >> >> On Tue, Jan 6, 2015 at 11:08 AM, Suhan Dharmasuriya <[email protected]> >> wrote: >> >>> Hi, >>> >>> I'm using ubuntu 14.04 and puppet version 3.4.3 for both master and >>> agent. >>> >>> Say currently there are no folders or file inside agent's /tmp/ >>> directory. >>> When attempting to create a directory structure as follows, >>> # create a directory >>> file { "/tmp/dbscripts/mysql/": >>> ensure => "directory", >>> } >>> >>> Error thrown saying, >>> root@elb-1:~# puppet agent -t >>> Info: Retrieving plugin >>> Info: Loading facts in /var/lib/puppet/lib/facter/java_home.rb >>> Info: Caching catalog for elb-1.openstacklocal >>> Info: Applying configuration version '1420519752' >>> *Error: Cannot create /tmp/dbscripts/mysql; parent directory >>> /tmp/dbscripts does not exist* >>> Error: /Stage[main]/Main/Node[elb-1]/File[/tmp/dbscripts/mysql/]/ensure: >>> change from absent to directory failed: Cannot create /tmp/dbscripts/mysql; >>> parent directory /tmp/dbscripts does not exist >>> Notice: /Stage[main]/Main/Node[elb-1]/File[/tmp/dbscripts/mysql/welcome >>> file.xml]: Dependency File[/tmp/dbscripts/mysql/] has failures: true >>> Warning: /Stage[main]/Main/Node[elb-1]/File[/tmp/dbscripts/mysql/welcome >>> file.xml]: Skipping because of failed dependencies >>> Notice: Finished catalog run in 0.06 seconds >>> >>> There is a Feature logged in puppetlabs (Feature #86) to address this >>> issue [1]. >>> >>> Workaround provided by puppetlabs is as follows. >>> # create a directory >>> file {['/tmp/dbscripts','/tmp/dbscripts/mysql']: >>> ensure => "directory", >>> } >>> >>> It is successful. >>> >>> When more number of non-existing parent directories present in the path, >>> more array elements to be given. >>> file {['/top','/top/second','/top/second/deep','/top/second/deep/deepest >>> ']: >>> ensure => directory >>> } >>> >>> We are planning to parameterise the path of the directories to be >>> created. >>> >>> After parameterising if we do as above workaround, we have to retrieve >>> the path and break down it into an array as above and then create the >>> folder structure. >>> >>> Is there a better, cleaner puppet workaround than the given one above? >>> >>> [1] http://projects.puppetlabs.com/issues/86 >>> [2] >>> https://github.com/ghoneycutt/puppet-module-common/blob/master/manifests/mkdir_p.pp >>> >>> Thanks, >>> Suhan >>> -- >>> Suhan Dharmasuriya >>> Software Engineer - Test Automation >>> >>> *WSO2, Inc. * >>> >>> lean . enterprise . middleware >>> Tel: +94 112 145345 >>> Mob: +94 779 869138 >>> Blog: http://suhan-opensource.blogspot.com/ >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> > > > -- > Suhan Dharmasuriya > Software Engineer - Test Automation > > *WSO2, Inc. * > > lean . enterprise . middleware > Tel: +94 112 145345 > Mob: +94 779 869138 > Blog: http://suhan-opensource.blogspot.com/ >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
