java - Chef-run windows 意外的输入结束,期待keyword_end

标签 java windows chef-infra chef-recipe

我正在尝试使用 Chef-run 将 java jdk 8 安装到 ubuntu 16.04 实例上。虽然当它尝试安装时我得到无法收敛目标,但当我打开日志时,我有以下信息:

[2018-06-21T20:24:34+01:00] ERROR: Remote chef-client error follows:
[2018-06-21T20:24:34+01:00] ERROR: SyntaxError: /var/chef-workstation/cache/cookbooks/windows/resources/share.rb:275: syntax error, unexpected end-of-input, expecting keyword_end

我的 Chef 存储库中有以下结构:

cookbooks
 -- jdk
  -- attributes
   -- default.rb
  -- recipes
   -- default.rb
  metadata.rb

attributes/default.rb内:

default['java']['install_flavor'] = 'openjdk'
default['java']['jdk'] = '8'

recipes/default.rb内:

include_recipe 'java'

metadata.rb内:

name 'name'
maintainer 'maintainer'
maintainer_email 'maintainer_email@email.com'
license 'MIT'
description 'Installs/Configures java'
long_description 'Installs/Configures java'
version '0.1.0'
chef_version '>= 12.14' if respond_to?(:chef_version)

depends 'java', '~> 2.1.0'

我看不出错误是由什么引起的。对此的任何帮助将不胜感激。

编辑:

如果它有帮助,我使用的带有参数的命令如下: chef-run -i ~/.ssh/key jack@host jdk

最佳答案

此问题应该在最新的稳定版本 0.1.139 中得到解决。

关于java - Chef-run windows 意外的输入结束,期待keyword_end,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50976272/

相关文章:

java - 如何检查客户端网络/防火墙的端口是否打开?

java - java中通过传递参数实现多线程

c# - Hook 哪些用户模式函数来监视/拦截文件访问?

java - JClouds-Chef BootstrapConfig Builder MissingMethodException

python - 在 Chef Recipe 中执行requirements.txt文件来安装python模块的正确方法是什么?

java - 为什么 DirContext.close() 不将 LDAP 连接返回到池中?

java - 调用 C# Web 服务时出现意外响应代码 500

linux - 无法启动 : The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop

我可以与我的应用程序捆绑在一起的 C++ 编译器

mysql - Chef ruby​​_block ShellOut mysql 结果 stdout 永远为空