shell - How to check if the directory is symlink in chef -
i want delete directory if not symlnik.
directory "/var/www/html/" action :delete only_if ??? end
the selected answer not work on windows or systems bash default interpreter. should use ruby solution cross-platform (and faster, since there's no process spawning):
directory '/var/www/html' action :delete not_if { file.symlink?('/var/www/html') } end
Comments
Post a Comment