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.
The `--changed-use` flag is an improvement over `--newuse` because it
does not trigger rebuilds for USE flag changes that would not affect the
installed package. Its use is generally recommended over `--newuse`.
Signed-off-by: Dustin C. Hatch <dustin@hatch.name>
The "name" parameter seems to be rather important as the identifying feature of a cron job. This is an update to the documentation to further emphasize this.
As far as I can tell, `name` is a required parameter. The guard test at (now) line 458 says you need name if `state == present` and at 464 if `state != present`, although that's not quite as clear. Each of the code paths at 485 - 495 pass the name param through to `add_job`, `update_job` and `remove_job`, and the actual _update_job method earlier seems to require it too. However I don't really know python so I may be wrong, but I can't see the circumstances when `name` is not required.
Generate warnings when users are shelling out to commands
rather than using modules
Can be turned off on a per-action line with the documented
warn=False flag. Can be turned off globally using
command_warnings = False in ansible config file.
Print out warnings using the standard playbook callbacks.
Created some additional tests in TestRunner.test_command
and also a demonstration playbook.
When trying to create a directory relative to the current working
directory, a directory is created at the root of the filesystem
instead. This patch ensures that directories specified with relative
paths will be created in the current working directory. Fully
qualified paths aren't affected
Signed-off-by: Major Hayden <major@mhtx.net>