You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been searching through the issues / conversations for a while now, but I haven't found exactly this problem.
Error executing action run on resource 'machine_execute[mkdir c:\chef\trusted_certs]'
WinRM::WinRMAuthorizationError
I've confirmed the password being used is correct, so that's not the issue. The machine get's created just fine, so the aws connection isn't the issue. I'm running machine_execute as a work-around for #237. And if I remove the machine_execute resource and manually create the directory, then re-run chef-client, everything works beautifully.
with_machine_options(
bootstrap_options: {
[ snip.....]
user_data: <<-EOF
[snip ... powershell script which opens the firewall, turns on winrm, and sets the administrator password]
EOF
},
is_windows: true,
winrm_no_ssl_peer_verification: true,
winrm_username: 'Administrator',
winrm_password: node['windows']['password']
machine "machine1" do
action :setup
end
machine_execute 'mkdir c:\chef\trusted_certs' do
machine 'machine1'
end
machine 'machine1' do
file 'c:\chef\trusted_certs\chef_server.crt', "#{File.dirname(FILE)}/../files/default/chef_server.crt"
chef_environment 'Dev'
end
It bombs on the machine_execute resource
running:
Chef Development Kit Version: 0.14.25
chef-client version: 12.10.24
Any help appreciated.
The text was updated successfully, but these errors were encountered:
I've been searching through the issues / conversations for a while now, but I haven't found exactly this problem.
Error executing action
run
on resource 'machine_execute[mkdir c:\chef\trusted_certs]'WinRM::WinRMAuthorizationError
I've confirmed the password being used is correct, so that's not the issue. The machine get's created just fine, so the aws connection isn't the issue. I'm running machine_execute as a work-around for #237. And if I remove the machine_execute resource and manually create the directory, then re-run chef-client, everything works beautifully.
here's my recipe:
with_driver 'aws'
with_chef_server 'https://my-chef-server',
:client_name => Chef::Config[:node_name],
:signing_key_filename => Chef::Config[:client_key]
with_machine_options(
bootstrap_options: {
[ snip.....]
user_data: <<-EOF
[snip ... powershell script which opens the firewall, turns on winrm, and sets the administrator password]
EOF
},
is_windows: true,
winrm_no_ssl_peer_verification: true,
winrm_username: 'Administrator',
winrm_password: node['windows']['password']
machine "machine1" do
action :setup
end
machine_execute 'mkdir c:\chef\trusted_certs' do
machine 'machine1'
end
machine 'machine1' do
file 'c:\chef\trusted_certs\chef_server.crt', "#{File.dirname(FILE)}/../files/default/chef_server.crt"
chef_environment 'Dev'
end
It bombs on the machine_execute resource
running:
Chef Development Kit Version: 0.14.25
chef-client version: 12.10.24
Any help appreciated.
The text was updated successfully, but these errors were encountered: