I have been working on writing a new recipe that makes use of powershell_script resource. I had some syntax error in the script code but it was not pointed out by chef-client run. Rather, the chef-client run would say that the resource ran successfully. Though I was able to find out the syntax error later but I was wondering if there is a better way to troubleshoot syntax errors in powershell_script resource. I tried running chef-client with -l debug switch but that gave not much information either.
I have seen similar behavior with the use of quotation marks and I had to escape those with “” to make it work.
Thanks
-Kapil
This email and any accompanying documents may contain privileged or otherwise confidential information of, and/or is the property of Education Management Solutions, Inc. If you are not the intended recipient, please immediately advise the sender by reply email & delete the message & any attachments without using, copying or disclosing the contents. Thank you.
I have been working on writing a new recipe that makes use of
powershell_script resource. I had some syntax error in the script code but
it was not pointed out by chef-client run. Rather, the chef-client run would
say that the resource ran successfully. Though I was able to find out the
syntax error later but I was wondering if there is a better way to
troubleshoot syntax errors in powershell_script resource. I tried running
chef-client with –l debug switch but that gave not much information either.
I have seen similar behavior with the use of quotation marks and I had to
escape those with “\” to make it work.
Thanks
-Kapil
This email and any accompanying documents may contain privileged or
otherwise confidential information of, and/or is the property of Education
Management Solutions, Inc. If you are not the intended recipient, please
immediately advise the sender by reply email & delete the message & any
attachments without using, copying or disclosing the contents. Thank you.
Thanks Julian! I will look into it. Looks like it was added in the newer version of chef-client.
In general, it will be great for chef documentation to add information regarding relevant chef version. That way, it will be much more clear.
Thanks
-Kapil
-----Original Message-----
From: Julian C. Dunn [mailto:jdunn@aquezada.com]
Sent: Wednesday, June 18, 2014 2:40 AM
To: chef@lists.opscode.com
Subject: [chef] Re: Troubleshooting powershell_script resource
You might consider using the convert_boolean_return parameter to actually raise an error if the Powershell script fails.
I have been working on writing a new recipe that makes use of
powershell_script resource. I had some syntax error in the script code
but it was not pointed out by chef-client run. Rather, the chef-client
run would say that the resource ran successfully. Though I was able to
find out the syntax error later but I was wondering if there is a
better way to troubleshoot syntax errors in powershell_script
resource. I tried running chef-client with –l debug switch but that gave not much information either.
I have seen similar behavior with the use of quotation marks and I had
to escape those with “\” to make it work.
Thanks
-Kapil
This email and any accompanying documents may contain privileged or
otherwise confidential information of, and/or is the property of
Education Management Solutions, Inc. If you are not the intended
recipient, please immediately advise the sender by reply email &
delete the message & any attachments without using, copying or disclosing the contents. Thank you.
It's buried from the homepage (default doc set is all about current
version of Chef Client). We're looking into ways to improve that
navigation so you can find it more easily. (heads up James Scott)
Thanks Julian! I will look into it. Looks like it was added in the newer version of chef-client.
In general, it will be great for chef documentation to add information regarding relevant chef version. That way, it will be much more clear.
Thanks
-Kapil
-----Original Message-----
From: Julian C. Dunn [mailto:jdunn@aquezada.com]
Sent: Wednesday, June 18, 2014 2:40 AM
To: chef@lists.opscode.com
Subject: [chef] Re: Troubleshooting powershell_script resource
You might consider using the convert_boolean_return parameter to actually raise an error if the Powershell script fails.
I have been working on writing a new recipe that makes use of
powershell_script resource. I had some syntax error in the script code
but it was not pointed out by chef-client run. Rather, the chef-client
run would say that the resource ran successfully. Though I was able to
find out the syntax error later but I was wondering if there is a
better way to troubleshoot syntax errors in powershell_script
resource. I tried running chef-client with –l debug switch but that gave not much information either.
I have seen similar behavior with the use of quotation marks and I had
to escape those with “\” to make it work.
Thanks
-Kapil
This email and any accompanying documents may contain privileged or
otherwise confidential information of, and/or is the property of
Education Management Solutions, Inc. If you are not the intended
recipient, please immediately advise the sender by reply email &
delete the message & any attachments without using, copying or disclosing the contents. Thank you.