On 28.05.2014 11:03, Supriya Uppalapati wrote:
Hi,

I have created directories in puppet/manifests/init.pp

 more init.pp
class createdirectory {
 file { [ "/u01/app/","/u01/oracle", "/u01/oracle/product", ]:
 ensure => "directory",
 owner => "oracle",
 group => "oinstall",
 recurse => true,
 mode => 755,
}
}

But, now I want to specify the "/U01/APP/","/U01/ORACLE",
"/U01/ORACLE/PRODUCT" this contents using hiera. Is there any way to
do this.

LET ME KNOW.


Setup something like...

some_oracle_variable:
  - /u01/app
  - /u01/oracle
  - /u01/oracle/product

in your hiera data then update your init.pp to include something like...

class createdirectory {
  $some_directories = hiera_array('some_oracle_variable', [])
  file { $some_directories:
    ensure  => "directory",
    owner   => "oracle",
    group   => "oinstall",
    recurse => true,
    mode    => 755,
  }
}

But that's just spit balling it off the cuff and without actually testing.

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5072e45be6a9ed896ec4203c08df0164%40undergrid.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to