Chef infra 从厨师工作站执行刀具列表时,不会列出我的厨师服务器

Chef infra 从厨师工作站执行刀具列表时,不会列出我的厨师服务器,chef-infra,chef-workstation,Chef Infra,Chef Workstation,您好,我已使用以下命令安装了chef服务器 #!/bin/bash set -x sudo yum update -y sudo yum install firewalld -y sudo systemctl status firewalld sudo systemctl start firewalld sudo systemctl status firewalld sudo yum install git -y sudo firewall-cmd --add-port=443/tcp --

您好,我已使用以下命令安装了chef服务器

#!/bin/bash

set -x

sudo yum update -y
sudo yum install firewalld -y
sudo systemctl status firewalld
sudo systemctl start firewalld
sudo systemctl status firewalld
sudo yum install git -y
sudo firewall-cmd --add-port=443/tcp --permanent
sudo firewall-cmd --reload
cd /tmp
wget  https://packages.chef.io/files/stable/chef-server/13.2.0/el/7/chef-server-core-13.2.0-1.el7.x86_64.rpm
sudo rpm -Uvh chef-server-core-13.2.0-1.el7.x86_64.rpm
sudo chef-server-ctl reconfigure  --chef-license=accept
sudo chef-server-ctl user-create tuser Test User testuser@yahoo.com 'Test1234' --filename /home/ec2-user/tuser.pem
sudo chef-server-ctl org-create testdemo 'Test Demo Inc' --association_user tuser --filename /home/ec2-user/testdemo.pem
wget  https://packages.chef.io/files/stable/chef-manage/2.5.16/el/7/chef-manage-2.5.16-1.el7.x86_64.rpm
sudo rpm -Uvh chef-manage-2.5.16-1.el7.x86_64.rpm
sudo chef-server-ctl reconfigure  --chef-license=accept
sudo chef-manage-ctl reconfigure --accept-license
sudo chef-server-ctl service-list
在NSG,我允许从任何地方使用443端口。然而,我想从我的工作站创建一个简单的EC2实例,显然是通过chef server来实现。当我执行**刀列表**时,我会收到下面的错误消息

ERROR: CONFIGURATION ERROR:You have invalid ruby syntax in your config file c:/Users/hp/.chef/config.rb

       SyntaxError: c:/Users/hp/.chef/config.rb:7: unterminated string meets end of file
       c:/Users/hp/.chef/config.rb:7: syntax error, unexpected end-of-input, expecting ']'
       Relevant file content:
         6:   'c:\Users\hp\chef-repo\'
         7: ]
我的C:\users\hp.chef\config.rb如下所示:

chef_server_url 'https://52.23.248.110/organizations/testdemo'
chef_zero.enabled true
#chef_zero[:port] 8889
client_key '/etc/chef/client.pem'
cookbook_path [
  'c:\Users\hp\chef-repo\'
]
注意,客户机密钥指向pem文件,我有两个pem文件,一个是用户pem文件,另一个是组织pem文件。客户的关键点是哪一个?如何解决这个错误

注:

Chef工作站是Windows 10笔记本电脑

厨师长服务器在AWS上

想提供一个ec2和一些基本的软件引导作为POC的一部分吗

错误:

SyntaxError: c:/Users/hp/.chef/config.rb:7: unterminated string meets end of file
       c:/Users/hp/.chef/config.rb:7: syntax error, unexpected end-of-input, expecting ']'
       Relevant file content:
         6:   'c:\Users\hp\chef-repo\'
         7: ]
这很清楚。配置文件中存在语法错误。您的反斜杠正在转义单引号。在'

6:'c:\Users\hp\chef repo\\' 或者使用前斜杠。Ruby实际上在任何平台上都使用/for路径

6:'c:/Users/hp/chef repo/'