[chef] Re: cannot make a symlink of a directory


Chronological Thread 
  • From: Tensibai < >
  • To:
  • Subject: [chef] Re: cannot make a symlink of a directory
  • Date: Wed, 30 Sep 2015 08:54:46 +0200

The link name is the link you want to create, the 'to' attribute is the source file. The error is quite clear about it, your target is an existing directory and so can't be replaced by a link.

More details here: https://docs.chef.io/resource_link.html

So try:

link "/usr/local/bar" do
  to "/usr/local/foo"
end

 

Le 2015-09-30 08:30, wolfgang a écrit :

Hi there,

I'm stuck on making a symlink of a directory.
I got this error 'Is a directory' when I make a symlink of a directory
as the following command in my recipe.

link "/usr/local/foo" do
to "/usr/local/bar"
end

/usr/local/foo is a directory and exists.
/usr/local/bar doesn't exist yet.
I want to make a symlink so that it would be /usr/local/bar ->
/usr/local/foo as a result of 'ls -l' command.

Cheers,
wolfgang
ps) Just in case, this is the error in detail.

Errno::EISDIR
-------------
Is a directory - /usr/local/foo

Resource Declaration:
---------------------
# In /var/lib/aaa/cookbooks/deploy-xyz/recipes/deploy.rb

24: link "/usr/local/foo" do
25:   to "/usr/local/bar"
26: end
27:

 

 



Archive powered by MHonArc 2.6.16.

§