Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "force" attribute to link resource #128

Merged
merged 1 commit into from
May 8, 2015

Conversation

mikeda
Copy link
Contributor

@mikeda mikeda commented May 7, 2015

既にファイルかシンボリックリンクが存在する場合にlinkがこけるので、forceオプションを使えるようにしてみました。

$ cat itamae/cookbooks/base/default.rb
link "/etc/localtime" do
  to "/usr/share/zoneinfo/Japan"
en

$ bundle exec itamae ssh --host test01.mikeda.jp itamae/cookbooks/base/default.rb 
 INFO : Starting Itamae...
 INFO : Recipe: /Users/tomohiro-ikeda/work/sysadmin2/itamae/cookbooks/base/default.rb
 INFO :   link[/etc/localtime] exist will change from 'false' to 'true'
ERROR :     Command `ln -s /usr/share/zoneinfo/Japan /etc/localtime` failed. (exit status: 1)
ERROR :     stdout | ln: failed to create symbolic link ‘/etc/localtime’: File exists

ERROR :   link[/etc/localtime] Failed.

@mikeda
Copy link
Contributor Author

mikeda commented May 7, 2015

issueがあった
#102

@ryotarai
Copy link
Member

ryotarai commented May 8, 2015

Thank you!

ryotarai added a commit that referenced this pull request May 8, 2015
Add "force" attribute to link resource
@ryotarai ryotarai merged commit c9b262e into itamae-kitchen:master May 8, 2015
@ryotarai
Copy link
Member

ryotarai commented May 8, 2015

released v1.2.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants