1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Explictly set the version of strict mode to use for powershell modules.

This commit is contained in:
= 2015-10-07 06:24:37 +01:00
parent 9e364c2eb5
commit 345ce424c6
2 changed files with 2 additions and 2 deletions

View file

@ -509,7 +509,7 @@ Windows modules checklist
* Favour native powershell and .net ways of doing things over calls to COM libraries or calls to native executables which may or may not be present in all versions of windows
* modules are in powershell (.ps1 files) but the docs reside in same name python file (.py)
* look at ansible/lib/ansible/module_utils/powershell.ps1 for common code, avoid duplication
* Ansible uses strictmode so be sure to test with that enabled
* Ansible uses strictmode version 2.0 so be sure to test with that enabled
* start with::
#!powershell

View file

@ -26,7 +26,7 @@
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
Set-StrictMode -Version Latest
Set-StrictMode -Version 2.0
# Ansible v2 will insert the module arguments below as a string containing
# JSON; assign them to an environment variable and redefine $args so existing