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.