ERROR: undefined method `python' for #<Chef::Node::Attribute:0x00000003f78ef8>
ERROR: undefined method `python' for #<Chef::Node::Attribute:0x00000003f78ef8>
我是厨师新手。
我尝试通过厨师将 python 安装到 Amazon EC2 中。
我在 chef-repo/nodes 文件夹中创建了一个节点 mynode.com.json
我在 mynode.com.json 中有一个 run_list:
"run_list": [
"recipe[python]"
],
然后我打电话给:
"knife solo cook mynode.com"
我收到这个错误:
/home/ec2-user/chef-solo/local-mode-cache/cache/cookbooks/python/attributes/default.rb:
16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: # See the License for the specific language governing permissions and
18: # limitations under the License.
19: #
20:
21: default['python']['install_method'] = 'package'
22:
23>> if python['install_method'] == 'package'
24: case platform
25: when "smartos"
26: default['python']['prefix_dir'] = '/opt/local'
27: else
28: default['python']['prefix_dir'] = '/usr'
29: end
30: else
31: default['python']['prefix_dir'] = '/usr/local'
32: end
System Info:
------------
chef_version=13.1.31
platform=amazon
platform_version=2017.03
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-solo worker: ppid=12199;start=09:16:41;
executable=/opt/chef/bin/chef-solo
Running handlers:
[2017-06-11T09:16:42+00:00] ERROR: Running exception handlers
[2017-06-11T09:16:42+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-06-11T09:16:42+00:00] ERROR: Exception handlers complete
[2017-06-11T09:16:42+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2017-06-11T09:16:42+00:00] FATAL: Stacktrace dumped to /home/ec2-user/chef-solo/local-mode-cache/cache/chef-stacktrace.out
[2017-06-11T09:16:42+00:00] FATAL: Stacktrace dumped to /home/ec2-user/chef-solo/local-mode-cache/cache/chef-stacktrace.out
[2017-06-11T09:16:42+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-06-11T09:16:42+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-06-11T09:16:42+00:00] ERROR: undefined method `python' for #<Chef::Node::Attribute:0x00000003f78ef8>
[2017-06-11T09:16:42+00:00] ERROR: undefined method `python' for #<Chef::Node::Attribute:0x00000003f78ef8>
有没有人可以帮忙?谢谢
该食谱 (python
) 已弃用,不适用于 Chef 13。请改用 poise-python
。
我是厨师新手。 我尝试通过厨师将 python 安装到 Amazon EC2 中。 我在 chef-repo/nodes 文件夹中创建了一个节点 mynode.com.json 我在 mynode.com.json 中有一个 run_list:
"run_list": [
"recipe[python]"
],
然后我打电话给:
"knife solo cook mynode.com"
我收到这个错误:
/home/ec2-user/chef-solo/local-mode-cache/cache/cookbooks/python/attributes/default.rb:
16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: # See the License for the specific language governing permissions and
18: # limitations under the License.
19: #
20:
21: default['python']['install_method'] = 'package'
22:
23>> if python['install_method'] == 'package'
24: case platform
25: when "smartos"
26: default['python']['prefix_dir'] = '/opt/local'
27: else
28: default['python']['prefix_dir'] = '/usr'
29: end
30: else
31: default['python']['prefix_dir'] = '/usr/local'
32: end
System Info:
------------
chef_version=13.1.31
platform=amazon
platform_version=2017.03
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-solo worker: ppid=12199;start=09:16:41;
executable=/opt/chef/bin/chef-solo
Running handlers:
[2017-06-11T09:16:42+00:00] ERROR: Running exception handlers
[2017-06-11T09:16:42+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-06-11T09:16:42+00:00] ERROR: Exception handlers complete
[2017-06-11T09:16:42+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2017-06-11T09:16:42+00:00] FATAL: Stacktrace dumped to /home/ec2-user/chef-solo/local-mode-cache/cache/chef-stacktrace.out
[2017-06-11T09:16:42+00:00] FATAL: Stacktrace dumped to /home/ec2-user/chef-solo/local-mode-cache/cache/chef-stacktrace.out
[2017-06-11T09:16:42+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-06-11T09:16:42+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-06-11T09:16:42+00:00] ERROR: undefined method `python' for #<Chef::Node::Attribute:0x00000003f78ef8>
[2017-06-11T09:16:42+00:00] ERROR: undefined method `python' for #<Chef::Node::Attribute:0x00000003f78ef8>
有没有人可以帮忙?谢谢
该食谱 (python
) 已弃用,不适用于 Chef 13。请改用 poise-python
。