community.general/lib/ansible/module_utils
Trond Hindenes 72760f5999 All changes referenced in PRs #8767 , #8768 , #8769 :
This changes the get-attr function slightly, and lets the module specify whether a param is needed and auto-fails if it is not present. A module can now verify params like so::
 $params = Parse-Args $args;
 $result = New-Object psobject;
 Set-Attr $result "changed" $false;
 $path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result

or

$params = Parse-Args $args;
 $result = New-Object psobject;
 Set-Attr $result "changed" $false;
 $path = Get-Attr -obj $params -name path -failifempty $true -emptyattributefailmessage "Oh man. You forgot the main part!" -resultobj $result

slight tweak in how the powershell module converts to json in order to support nested objects (allows for more complex facts, among others)

This script gathers some extended facts on windows hosts in a json array attribute called "ansible_interfaces". This info is needed for some network-related modules I'm working on. Required the update to powershell.ps1 to return deeply nested json objects.
2014-08-29 10:39:42 +02:00
..
__init__.py Add package file. 2013-10-26 11:10:54 -04:00
a10.py A10 module improvements 2014-08-28 20:23:48 -05:00
basic.py Don't use ternary if statements. Fixes #8784 2014-08-27 19:16:48 -05:00
ec2.py Add GovCloud region to list of regions for AWS 2014-08-21 16:12:51 -05:00
facts.py Revert "Added cross-platform uptime fact" since causing failures on Ubuntu. 2014-08-08 14:58:09 -04:00
gce.py Add support for environment variables in GCE module. 2014-08-01 11:44:58 -05:00
known_hosts.py removed port from domain name qualification, fixes 7941 2014-07-02 19:54:50 -04:00
openstack.py Merge branch 'nova-compute-enhancements' of git://github.com/emonty/ansible into devel 2014-08-08 11:05:13 -04:00
powershell.ps1 All changes referenced in PRs #8767 , #8768 , #8769 : 2014-08-29 10:39:42 +02:00
rax.py Dedupe PTR record related code in rax_dns_record 2014-08-06 16:47:33 -05:00
redhat.py fixed typos found by RETF rules in PY files 2014-05-03 18:40:05 +02:00
splitter.py Make sure we only use unquote on quoted lines in lineinfile when needed 2014-08-11 11:23:52 -05:00
urls.py Default fetch_url to use TLSv1 instead of SSLv2/3 2014-08-28 08:45:01 -05:00