# file: ensure directory and link

Hello,

i am very new in puppet and have a simple question. I have already googled much time about the problem, but I didn't find any solutions for my case.

I want do create a folder and a symlink

file { "/oracle/bin":
ensure => 'directory',
owner  => 'root',
mode   => '0755',
}

file { "/oracle/bin":
target => "/home/${user_oracle}/bin", }  But it didn't work. I get always an message: is already declared Can somebody help me please. Thank you, Stefan edit retag close merge delete ## 1 answer Sort by » oldest newest most voted I solved it self. It was a mistake on my side The solution is: $directory_oracle_bin = [ '/oracle', '/oracle/bin', ]

file { $directory_oracle_bin: ensure => 'directory', owner => 'root', mode => '0755', } file { "/home/${user_oracle}/bin":
target => "/oracle/bin",
force   => yes,
}

more