* uri: Avoid exception in common scenario
So I was confused by the fact that the **uri** module, when not
returning an acceptable HTTP status code, returns:
The full traceback is:
File "/tmp/ansible_UQwiI4/ansible_module_uri.py", line 471, in main
uresp['location'] = absolute_location(url, uresp['location'])
While the actual error was:
Status code was 400 and not [201]: HTTP Error 400:
I also wonder why that message ends abruptly. I would have expected
`HTTP Error 400: Bad Request` which would be more useful.
* uri: Avoid false positive tracebacks in fail_json() on PY2
One of the earlier implementation of unified temp for 2.4 passed the
temp diretory to the remote side using this environment variable. We
later changed it to be passed via a module parameter but forgot to
remove the environment variable.
* fix fedora version dnf fact, default pkg_mgr detection per distro family
* loop over possible dnf/yum paths in case there are multiple canonical sources later in life
Signed-off-by: Adam Miller <admiller@redhat.com>
* Support multi-doc yaml in the from_yaml filter
* Most automatic method of handling multidoc
* Only use safe_load_all
* Implement separate filter
* Update plugin docs and changelog
Allow specifying the source and destination files' encodings in the template module
* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
d7df072b96 changed how we call
journal.send() from positional arguments to keyword arguments. So we
need to update the test to check for the arguments it was called with in
the keyword args, not in the positional args.
* Only add exception/traceback on Python 3
On Python 2 the traceback could be any exception from the stack frame
and likely unrelated to the fail_json call.
On Python 3 the traceback is cleared outside any exception frame, so the
call always returns the most inner traceback (if any), and therefor is
most likely related to the fail_json call.
* Add uncertainty to traceback on Python 2
On Python 2 the last exception in the stack frame is being returned,
this could be unrelated to the actual error, especially if fail_json()
is called outside an except: block.
* Add parameter to keep elb rules
Does not purge elb rules. This is usefull if running the elb_application_lb
role and there is the desire to keep existing rules.
* Change variable name keep_rules to purge_rules
The descriptor purge has been used in the past.
* Changed default for purge_rules
Default is purge_rules. This is how the module has functioned previously. This change maintains
the previous behavior.
* Add integration test for purge_rules flag
* Change wording of test task
* Fix merge conflcit
* Changed default for purge_rules
Default is purge_rules. This is how the module has functioned previously. This change maintains
the previous behavior.
* merge conflcit
* Change wording of test task
* Add purge_rules option to test
* Change test description wording
* Expand purge_rules documentation
* Clarifies documentation for purge_rules option
* Documentation change for resizefs
Changed documentation to match the default value of resizefs set in the code.
Added a note on the resizefs use on the example utilizing it.
* Remove test now it validates fine
This provides a more convenient way for testing (async) jobs.
When used with a non-async job it will report a warning so the user is
aware that he may be doing something incorrect.
Since the 'finished' result value is an integer (!), the test is turning
this in a proper boolean.
* cobbler_system: New module to manage Cobbler systems
This module is useful to provision new systems using Cobbler and Ansible.
* cobbler_system: warn on invalid properties
This fix checks if dirname is not equal to '' before proceeding
to create actual directory with name.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* The JSONDecodeError exception only exists in Python 3.
* Without a properly parsed JSON response there is no more error
processing to be done, no matter the http response code.
Relates to #38178
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
* Detect failed sysvinit module
- This checks the stderr instead of the rc to detect whether the
sysvinit module was successful or not, as even when failing, the
rc would be 0.
- It immediatly became obvious that the debug info when failing
was far too little to properly debug the role. To improve this,
I also added the rc, stderr and stdout to the debug output.
* Revert stderr check to rc check, rename out->stdout, err->stderr
* win_user: use different method to validate credentials that does not rely on SMB/RPC
* Use Add-Type as SetLastError on .net reflection not working on 2012 R2