Commit Graph

254 Commits (90d262093921d8d16f035419b7f0cc395ab6e058)

Author SHA1 Message Date
Jordan Borean 6666b070a9
openss: fix various test and Python 3 issues (#47188) 6 years ago
Sloane Hertel b808e1bc5c [s3_bucket] Cast tag keys and values to text to match the values returned (#46405)
* Cast tag keys and values to text to match the values returned

* changelog
6 years ago
Brian Coca fce9673ac1 Adoc fixes (#47137)
* removed hardcoded loader/plugins list
* updated a few errors to keep orig object
* fix httpapi/cliconf listing
* ansible-doc fixes
* show undocumented as UNDOCUMENTEd
* added missing undoc
6 years ago
Toshio Kuratomi 61ae6424a3 An earlier optimization of ansible-doc -l caused failures. (#47012)
* An earlier optimization of ansible-doc -l caused failures.

The optimization quickly searches the plugin code for short_description
fields and then uses that in the -l output.  The searching was a bit too
naive and ended up pulling out malformed yaml.  This caused those
plugins to be omitted from the list of plugins of that type with
a warning that their documentation strings were wrong.

This change makes the documentation parser aware that the documentation
string could have a relative indent for all of its fields which makes it
robust in the face of this particular problem.

* Don't search for space after short_description:

Any whitespace would be valid.  In particular newline
6 years ago
Jordan Borean dd46f953f6
postgresql_user: fix test errors on newer Fedora versions (#47166) 6 years ago
Matt Martz 02f4d0a57f
Ensure that an empty literal list with loop skips the task (#47129) 6 years ago
Matt Hoffman acbecd5f23 adds redirect configurations and probes to azure_rm_appgateway (#46607) 6 years ago
Matt Martz c3d5779a41
Use the copied and merged task for calculating task vars in the free strategy. Fixes #47024 (#47060) 6 years ago
Dag Wieers 7cc78c5a04 Update changelog fragment 6 years ago
Dag Wieers a4948d3845 Add changelog snippet 6 years ago
Jonathan Oddy f2dccb90e8 Restore SIGPIPE handler to DFL on POpen
Python sets the SIGPIPE handler to SIG_IGN. On execv() signal handlers are
reset to their defaults, EXCEPT those that are SIG_IGN which are left ignored.
In Python 3 subprocess.popen explicitly resets the SIGPIPE handler to SIG_DFL,
but unfortunately in Python 2.7 it does not. This leads to subprocesses being
executed with SIGPIPE ignored. This is often a problem with bash scripts which
rely on SIGPIPE to terminate commands in a pipe, but can easily be a problem
with other applications.

This implements the Python 3 behaviour for Python 2.7 by using a preexec_fn.
6 years ago
Matt Martz a06a5ded61
Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833) 6 years ago
Brian Coca 9e0c2a658f
better information for user from inventory plugins (#46766)
* better information for user from inventory plugins

 - use foreman as example
6 years ago
Brian Coca 551de8b166 now clog matches code 6 years ago
Brian Coca 3453dace85
use to_text instead of str in async_status (#45990)
* use to_text instead of str in async_status

* used to_native instead as per feedback
6 years ago
Peter Oliver 40fb992a6f Locate prtdiag even when absent from /usr/bin (#44113)
* Locate prtdiag even when absent from /usr/bin

On Solaris 8 hosts, this prevents fact collection from aborting with:

    Argument 'args' to run_command must be list or string

* Lint fix.

* Style: pass /usr/platform/.../sbin as optional path to get_bin_path().
6 years ago
Shuang Wang cd1faca6e0 copy - support recursive copying with remote_src (#43998)
* Allow copy module to work with recursive and remote_src #14131
6 years ago
Thomas Picariello 62d131716b Do not try to encode metadata if it is None (#46739)
* Do not try to encode metadata if it is None

* Add changelog fragment

* Fix fragment missing EOF line
6 years ago
Daniel Jakots 753711cd12 Register missing parameter reboot_timeout (#46585) 6 years ago
Adam Miller c8ed5c29e9 allow update_cache as stand alone operation for yum/dnf (#46183)
* allow update_cache as stand alone operation for yum/dnf

Fixes #40068

Signed-off-by: Adam Miller <admiller@redhat.com>

* make sanity tests happy

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Felix Fontein a74774488d docker_container: add port range and IPv6 support for published_ports (#46596)
* Allow port ranges.

* Adding IPv6 support for published_ports.

* Die when hostname is passed instead of IP address.

* Added changelog.
6 years ago
Felix Fontein 77127d6768 docker_container: allow more mount modes for volumes (#46598)
* Being more strict about volume mount modes.
6 years ago
Felix Fontein c5ea3d058e docker_container: fix problem with published_ports idempotency (#46595)
* Fix comparisons for expected_ports (set vs dict).

* Added changelog.
6 years ago
Felix Fontein 8afe46dc02 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.
6 years ago
Simon Liddicott f731e68bca Add chdir support to win_package (#46123)
* Add chdir support to win_package

* Add chdir support to uninstall too.

* Update docs to account for uninstall.

* Correct variable substitution for hashtable.

* added changelog fragment
6 years ago
flowerysong be05069c61 Port the sns module to boto3 (#45634)
* Port sns to boto3

* Exception handling for ARN lookup

* sns: Add integration tests
6 years ago
Felix Fontein a520ca3298 docker_container, docker_image_facts: allow to use image IDs (#46324)
* Allow to specify images by hash for docker_container and docker_image_facts.

* flake8

* More sanity checks.

* Added changelog.

* Added test.

* Make compatible with Python < 3.4.

* Remove out-commented imports.
6 years ago
Felix Fontein 895019c59b docker_container: fix behavior when image is not specified (#46322)
* Don't simply ignore container in present() if image is not specified.

* Use image from existing container for recreation if not specified.

* Added changelog.

* Improve comment.
6 years ago
Sam Doran bcfdc37be0 Add documentation on underlying tools in user module (#46455) 6 years ago
Sam Doran b74279d14c Use proper index value with insertbefore on a one line file (#46071)
Add tests and changelog
6 years ago
newtonne bd849e8fb4 Macports: Add upgrade parameter and replace update_ports with selfupdate (#45049)
* macports: Replace update_ports with selfupdate

- Macports discourages use of `port sync` and recommends using `port
selfupdate` instead.
- Keep `update_cache` and `update_ports` as aliases.
- No longer require the `name` parameter so that `selfupdate` can be
used in a task by itself.

* macports: Add upgrade parameter

- New upgrade parameter which can be used to upgrade all outdated ports.

* Add changelog fragment
6 years ago
Jordan Borean e972287c35 win_exec: refactor PS exec runner (#45334)
* win_exec: refactor PS exec runner

* more changes for PSCore compatibility

* made some changes based on the recent review

* split up module exec scripts for smaller payload

* removed C# module support to focus on just error msg improvement

* cleaned up c# test classifier code
6 years ago
David Baumann c97f2b4c01 Fix callout json plugin show global stats (#43123)
* fix callback Plugin json to support global stat set by set_stats module

* refactor to not break compatiblity, add trailing comma on output dict

* Remove sorted, as it not needed

* refactor, to sivels better code

* clean some code messup

* add changelog fragment

* added missing new line

* fix pep8 stuff
6 years ago
Remo Wenger 83e584577a docker_container: ambiguous parameter "stop_timeout" (#43874)
* docker_container: Honour stop_timeout when creating docker containers (#43814)

* Adjusting description to what actually happens.

See docker-py changelog for 2.7.0: 'APIClient.stop will
no longer override the stop_timeout value present in the
container’s configuration.'

* Add a test whether stop_timeout can be configured for the container.

* Added changelog.

* Integrate with comparisons (by default, ignore stop_timeout value for restarts; will be configurable with PR ansible/ansible#44789).

* Fix config change code and tests (#2)

* Improving wildcard test.
* Using correct config.
6 years ago
Daniel Jakots 2769a4e2cc Add support for OpenBSD (#46147) 6 years ago
Sam Doran 8b1ae30e2e
Use bytes rather than native string for result (#46281)
This prevents a stack trace in Python 3 when the result is an empty file since
the file is open in binary mode and a native string in Python 3 is str,
not bytes.
6 years ago
Sam Doran 77f73f6d2a
Use unicode instead of bytes (#46234)
The stdout and stderr values returned from self._low_level_execute() are text, not bytes. This results in an error in Python 3 since str and bytes cannot be concatenated.

Changing to unicode type allows this to work without error on Python 2 and Python 3.
6 years ago
Felix Fontein 84682464c7 docker_container: allow to configure comparison for existing containers (#44789)
* Added comparison configuration.

* Improving user feedback on specifying a wrong option.

* Avoid bare except.

* Added basic integration tests.

* Adding wildcard support.

* Warn if ignore_image=yes is overridden.

* Added changelog fragment.
6 years ago
Sloane Hertel 9efc3dc761
Fix ec2_group for EC2-Classic accounts (#46242)
* Fix ec2_group for EC2-Classic accounts

* changelog
6 years ago
Jordan Borean 23c94295dc
Revert "powershell - fix for ANSIBLE_KEEP_REMOTE_FILES on older Pythons (#45942)" (#46238)
This reverts commit ce515a626c.
6 years ago
Ryan S. Brown 05e3b5d632 [docs] Add changelog for ec2_asg launch template feature 6 years ago
Jordan Borean d6251e5b27
winrm: add further conditional to using pexect for kerb auth (#45952) 6 years ago
Matt Martz 172137c3ca
Fix issues with PLUGIN_FILTERS_CFG config handling (#45994)
* Ensure that the value of PLUGIN_FILTERS_CFG is treated as type=path, and that we use the standard section of 'defaults' instead of 'default'

* deprecate the default section

* Don't add version_added for the corrected section
6 years ago
Matt Martz c0915e2f5a
Support nested JSON decoding in AnsibleJSONDecoder (#45924)
* Support nested JSON decoding in AnsibleJSONDecoder

* Add tests for vault portion of AnsibleJSONDecoder
6 years ago
Felix Fontein 7caf70db42 docker_container: fix various idempotency problems and non-working options (#45905)
* Sorting args.

* Doing comparisons of options with container parameters in a more context-sensitive way.

This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).

* Make blkio_weight work.

* Fix cap_drop idempotency problem.

* Making groups idempotent if it contains integers.

* Make cpuset_mems work.

* Make dns_opts work.

* Fixing log_opts: docker expects string values, returns error for integer.

* Adding tests from felixfontein/ansible-docker_container-test#2.

* Make uts work.

* Adding changelog entry.

* Forgot option security_opts.

* Fixing typo.

* Explain strict set(dict) comparison a bit more.

* Improving idempotency tests.

* Making dns_servers a list, since the ordering is relevant.

* Making dns_search_domains a list, since the ordering is relevant.

* Improving dns_search_domains/dns_servers.

* Fixing entrypoint test.

* Making sure options are only supported for correct docker-py versions.
6 years ago
Matt Davis 3b52d968e6
fix premature exit when RG doesn't exist (#46013)
* fixes #45941
* corrects regression introduced by #26104; when the resource group doesn't exist, the module exits prematurely with an error instead of creating it.
6 years ago
Brian Coca a47671aad1 allow openstack invetnory to work cacheless
fixes #45431
6 years ago
Jordan Borean 198423d6fb
powershell: do not quote join_path result to reflect ShellBase join_path (#45944) 6 years ago
Jordan Borean ce515a626c
powershell - fix for ANSIBLE_KEEP_REMOTE_FILES on older Pythons (#45942) 6 years ago
Matt Martz 95e77ac853
Ensure that the src file contents is converted to unicode in diff info (#45744)
* Ensure that the src file contents is converted to unicode in diff info. Fixes #45717

* Fix up and cleanup

* The diff functionality in the callback plugins should have the
  to_text() calls removed since we're now doing it in ActionBase
* catching of UnicodeError and warnings in the callback diff
  functionality from 61d01f549f haven't been
  needed since we switched to to_text so remove them.
* Add a note to ActionBase's diff function giving an example of when the
  diff function will be inaccurate and how to fix it

* Fix callback get_diff() tests

I believe the unittests of callback's get_diff() were wrong.  They were
sending in a list where strings were expected.  Because previous code
was transforming the lists into strings via their repr, the previous
tests did not fail but they would have formatted the test cases output
in an odd way if we had looked at it.
6 years ago