Created
February 6, 2014 10:26
-
-
Save wshino/8841744 to your computer and use it in GitHub Desktop.
jenkins用のrecipeを書いてみたけど再帰で権限が変更されないのなんで
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env = node[:base][:env] | |
cookbook_file "/etc/sysconfig/jenkins" do | |
source "build/etc/sysconfig/jenkins" | |
owner "root" | |
group "root" | |
mode "0600" | |
end | |
%W{ /var/log/jenkins /var/cache/jenkins /var/lib/jenkins }.each do |path| | |
directory path do | |
owner "ope" | |
group "ope" | |
mode 00755 | |
recursive true | |
end | |
end |
bash "change directory owner" do
user "root"
code <<-EOH
chown -R ope:ope /var/log/jenkins
chown -R ope:ope /var/cache/jenkins
chown -R ope:ope /var/lib/jenkins
EOH
end
こういう逃げ方しかないのかな?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
すでにあるディレクトリはrecursive trueでもうまく変更できんらしい、どういう解決策がいいんだろう。