Ask Your Question
0

file: ensure directory and link

asked 2017-02-14 05:02:45 -0600

Stefan Kuppelwieser gravatar image

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":
    ensure => 'link',
    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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-14 06:25:27 -0600

Stefan Kuppelwieser gravatar image

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":
    ensure => 'link',
    target => "/oracle/bin",
    force   => yes,
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-14 05:02:45 -0600

Seen: 729 times

Last updated: Feb 14