[英]Getting error while running curl command via chef
While running curl command using chef getting error.使用厨师运行 curl 命令时出错。 Block which I am trying to execute:我试图执行的块:
bash 'create_aemadmin' do
code <<-EOF
curl -u admin:admin -FcreateUser=aemadmin -FauthorizableId=aemadmin -Frep:password=#{node['aem_vm_cookbook']['aem_api_auth']['password']} -Fprofile/familyName=aemadmin http://#{node['aem_vm_cookbook']['host_name']}:8080/libs/granite/security/post/authorizables
EOF
not_if { File.exist?('/home/aemadmin/dce/aemadminusercreate') }
end
Error which i am getting for this:我为此得到的错误:
/bin/chef-client:162:in `<main>'
[2020-09-09T01:48:24-05:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: bash[create_aemadmin] (aem_vm_cookbook::default line 455) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of "bash" "/tmp/chef-script20200909-12267-2dd1ke" ----
STDOUT:
STDERR: curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
---- End output of "bash" "/tmp/chef-script20200909-12267-2dd1ke" ----
Ran "bash" "/tmp/chef-script20200909-12267-2dd1ke" returned 2
Using this block i am trying to create a user i can see curl is getting values for variable which i am using but it is not able to execute.使用此块,我正在尝试创建一个用户,我可以看到 curl 正在获取我正在使用但无法执行的变量的值。
Due space issue i was facing this.由于空间问题,我正面临这个问题。 Now i resolved it现在我解决了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.