Commit Graph

603 Commits (9bb1c596860a9407156f29822efa65c702e4a574)

Author SHA1 Message Date
Abhijeet Kasurde 17bb4f4932 default: callback plugin allow unreachable task to stderr (#50533)
Provide toggle flag to allow display of unreachable task to stderr
using default callback plugin.

Fixes: #48069

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Renato Orgito 6f9bca9de3 Add auth_timeout parameter when supported by paramiko (#50448)
* Add auth_timeout parameter when supported

Paramiko 2.2 introduces the auth_timeout parameter. This will set the
parameter to the same value of the timeout parameter to prevent
"Authentication timeout" errors.

* Conditionally add auth_timeout to ssh.connect

Renamed sock_kwarg to ssh_connect_kwargs and conditionally added the
auth_timeout parameter based on the installed paramiko version.

* Add changelog fragment
6 years ago
trogdor_the_burninator 1dac10e5c3 Add AIX support to reboot module (#50353)
* Add ability for reboot module to work for AIX

* changelog for AIX reboot support
6 years ago
Brian Coca 207848f354 avoid x2 setting of set_fact when 'cacheable' (#50564)
* avoid x2 setting of set_fact when 'cacheable'

  fixes #50556

* ammend docs to new behaviour

* added period
6 years ago
vpiserchia 774a667591 Add Devuan Support for ascii release - resolve 49615 (#49616)
* Add Devuan Support for ascii release - resolve 49615

* Devuan Ascii does not have the VERSION_ID in the /etc/os-release file, we need to set NA
6 years ago
Toshio Kuratomi 27f9c3fba0 Clarify the change made to reverse_inventory 6 years ago
Martin Krizek 6d604f9b01 Allow for vaulted templates in template lookup (#49819)
Fixes #34209
6 years ago
Martin Krizek 82c95e07b5
Fix searchpath in the template lookup (#50488) 6 years ago
Matt Martz 9abeecb6d4
Add new AnsibleTemplateError to more easily catch templating issues (#50563)
* Add new AnsibleTemplateError to more easily catch templating issues. Fixes #50154

* Add changelog fragment
6 years ago
Toshio Kuratomi 40e7c7a210
Add a porting guide entry for ansible_distribution facts (#50251)
* Add a porting guide entry for ansible_distribution facts

Switching away from platform.distro() will cause changes sometimes due
to the new code using new sources of information that may be out of sync
with the old ones.  Just have to make people aware of that and also what
we are doing to mitigate it when appropriate.

* wordsmithed, added links for new distro backend
6 years ago
Jordan Borean b967f4dcc1 dnf/yum - added install_weak_deps option (#50525)
* dnf/yum - added install_weak_deps option

* skip creating weak dep packages if rpm doesn't support it

* fix rpm check for older hosts
6 years ago
Toshio Kuratomi afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
6 years ago
Matt Martz 3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
6 years ago
Jordan Borean 63e454a4b2 dnf - fix conf_file loading (#50515) 6 years ago
Abhijeet Kasurde a45063defe Update changed_when and failed_when examples (#50411)
Added examples in playbooks_error_handling doc for handlining
multiple conditions in changed_when and failed_when

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 5c5cd2dc4d openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.
6 years ago
Felix Fontein a5bf71ac6a openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.
6 years ago
Felix Fontein 6b33c588d0 docker_swarm_service: Fix typo for option type (#50483)
* Fix typo for option type in docker_swarm_service.

* Add changelog.
6 years ago
Adam Miller b81a74f551 add changelog for #50242 (#50480)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Adam Miller ca084889c7 fix order of dnf api operations so transactions don't fail (#50038)
* fix order of dnf api operations so transactions don't fail

Previously dnf.base.fill_sack() was called before
dnf.base.update_cache() which apparently breaks dnf transaction
logic as per https://bugzilla.redhat.com/show_bug.cgi?id=1658694

Fixes #49060

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

* add changelog and test case

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Felix Fontein 26e3240315 docker_secret, docker_config: allow to base64-decode data (#49688)
* Adjust docker_config and docker_secret to be more similar.

* Add data_is_b64 parameter to docker_secret and docker_config.

* Add changelog.
6 years ago
René Moser e761ea3f9d
vultr_server: fix multiple ssh keys not handled (#50337)
* vultr_server: fix multiple ssh keys not handled

* add changelog fragment
6 years ago
Simon Dodsley 507f89e693 Pure Storage facts fix (#50349)
* Add module for Pure Storage FlashBlade to manage directory services

* Fix facts not correctly passing into ansible_facts dict
6 years ago
Adam Miller 33156712a9 Provide both service state and status when possible in service_facts (#49618)
* Combine systemd units/unit-files output for service_facts

Fixes #47118

Previously we were only taking the output of `systemd units` which
would leave out information about the service units that were
disabled, static, masked, etc. Now we're aggregating the results so
that anything not active/inactive/dead at least is pulled as fact
data with it's state provided.

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

* provide state and status information about services

Fixes #45730

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Abhijeet Kasurde fc6c500b5b
postgresql_user: set type of conn_limit (#50178)
conn_limit type is set to 'int'. This will allow module to compare conn_limit with record value without type casting.

Fixes: #38118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Nathaniel Case f05979932b
Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc (#48306)
* Allow AnsibleVaultEncryptedUnicode to pass through exec_jsonrpc

* Add changelog
6 years ago
Abhijeet Kasurde 14eba662c8 Correct match test documentation (#50229)
Match test matches zero or more characters at the begining of the string.

Fixes: #32366

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dag Wieers 0fe7d569c9 win_firewall_rule: Remove invalid 'bypass' action (#50207)
* win_firewall_rule: Remove invalid 'bypass' action

This fixes #50143

* Add changelog fragment
6 years ago
Dag Wieers 50ed152ab9 win_updates: Correctly report changes on success (#50188)
* win_updates: Correctly report changes on success

* Add changelog fragment
6 years ago
Jacob Floyd 069e0b8d57 Make modprobe module check for builtins as well (#37150)
Without this modprobe always reports changed when modprobe-ing a builtin module.

With this, if a kernel module is a builtin, the modprobe module will:
- succeed (without incorrectly reporting changed) if ``state`` is ``present``;
- fail if ``state`` is ``absent``

The failure will have whatever error message modprobe returns when
attempting to remove a builtin module. For example:
``modprobe: ERROR: Module nfs is builtin.``
6 years ago
Gavin Williams 01a1ce16ce Jenkins_plugin: Handle 'latest' version when installing plugin for first time (#49723)
* Handle 'latest' version when installing module for first time

Otherwise, a fresh install of a plugin with 'version: latest' gets installed without its dependencies, rendering the plugin effectively useless.

* Add changelog
6 years ago
Julien Girardin 3e303bea4c List correctly current PV in "lvg" module: fix lvg reduce (#49731)
* Refactor integration test for lvg module to introduce grow/reduce test

* List correctly current PV in lvg module: fix lvg reduce

Previous behaviour was to only take into account PV passed in 'pvs'
argument. This lead to reduce not working as expecting:

* with state=present and list of wanted pvs, lvg found only the pvs to
  add or already present and ignored the pv to remove (obviously absent
  from the list of given PV)

* with state=absent and a pv to remove, lvg found that the remaining pvs
  list is empty (ignoring possible other PV in the vg) and decides to
  remove the vg entirely (as supposely no PV are left anymore to store
  lvm metadata)

* Add changelog fragment
6 years ago
Abhijeet Kasurde b132593861 Move doc fragments to changelogs/fragments dir (#50179)
Move changelog fragment to changelogs/fragments dir
6 years ago
Miguel Duarte Barroso 4951e5a5b7 os_security_group_rule proper module exit (#50076)
When the security group the rule belongs to does not exist and
the state is absent, the module is not properly exited, leading
to a playbook execution failure.

Fixes issue #50057
6 years ago
Michael Rose bcae7f24cb influxdb_user: Fixed unhandled exception on invalid login credentials (#50134) 6 years ago
Andrea Tartaglia 65c7424a35 Added organization in the scm_credential get (#49884)
* Added organization in the scm_credential get

* Fallback looking for cred in project org

* Tests project with multi org credential

* Fixed CI issue

* Added changelog fragment
6 years ago
Jordan Borean 65ce1b727e
win_copy - fix remote dir copy when it contains an empty dir (#50126) 6 years ago
Martin Krizek 545edc9114 facts: detect FreeBSD KVM guests (#50030)
Fixes: #49158
6 years ago
Martin Krizek 29c3bb48e9 facts: correctly detect multiple ipv6 addresses per device (#50020)
Fixes #49473
6 years ago
Jordan Borean efda3eaf1c
win_lineinfile - fix malformed returned json (#50066) 6 years ago
Brian Coca 88c87a3583
added handlers_from (#49220)
* added handlers_from

fixes #46769
6 years ago
Jérémy Lecour 2fb9b46752 Lineinfile must not insert lines multiples times with insertbefore/insertafter (#49409)
* Change test suite to fit expected behaviour

This reverts some changes from ansible/ansible@723daf3
If a line is found in the file, exactly or via regexp matching, it must 
not be added again.
insertafter/insertbefore options are used only when a line is to be 
inserted, to specify where it must be added.

* Implement the change in behaviour mentioned in the previous commit

* Fix comment to reflect what the code does

* Set the correct return message.

In these cases, the lines are added, not replaced.

* Add a changelog
6 years ago
Matt Martz 7eb1ab45a7
Allow tags to be templated from a variable (#49833)
* Allow tags to be templated from a variable. Fixes #49825

* Restore _load_tags to ensure we do csv tag splitting

* Add tests for csv tags and templated tags

* evaluate_tags doesn't need to accept strings, because _load_tags handles this
6 years ago
Matt Martz a0d71e7735
Fix reverse_inventory order to work on python3 (#49895) 6 years ago
Aleksander Kovtunenko ba562043e1 changed if logic Type to boolean (#49628)
* changed Type to boolean

* fix after review

* created fragment
6 years ago
Toshio Kuratomi 61b1daa65f Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
6 years ago
Eric Miller 4d0f2e632c Docker inventory service/stack groups for docker swarm (#48021)
* Adding service and stack grouping to docker inventory

* Updating documentation

* Adding changelog fragment for docker.py inventory script
6 years ago
Adam Miller 16f48bb4be
add changelog for pr #49912 (#49962)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Dave Bendit d62d7176b0 [docker_container] Failing on non-string env values (#49843)
* [docker_container] Failing on non-string env values

Fixes #49802

* Clarify failure message

Co-Authored-By: DBendit <David@ibendit.com>

* Fixup from review
6 years ago
Dave Bendit c67f4290e6 [docker_volume] Checking option minimal versions (#49839)
Fixes #38833
6 years ago
Akshay Gaikwad 1e0363ec7d Support for cache_from parameter in docker_image module (#49787)
* Support for cache_from parameter in docker_image module

Fixes #21704

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Minimum docker version check for cache_from option

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add changelog fragment

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* cache_from fix when docker-py is older

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
6 years ago
Jordan Borean 4019d4f6d1
Windows Privileges - moved util code to it's own C# util (#48897)
* Windows Privileges - moved util code to it's own C# util

* Rename Enabler class to PrivilegeEnabler to remove ambiguity

* rename Utils to PrivilegeUtil

* fix missing util name changes
6 years ago
Jordan Borean 190d1ed7f1 win become: refactor and add support for passwordless become (#48082)
* win become: refactor and add support for passwordless become

* make tests more stable

* fix up dep message for Load-CommandUtils

* Add further check for System impersonation token

* re-add support for become with accounts that have no password

* doc fixes and slight code improvements

* fix doc sanity issue
6 years ago
Michael Rose b422c59ada Amends #47040 - influxdb_user - Prevents potential accidental password changes to blank (#49084)
* Amends #47040 - Prevents potential accidental password changes to blank

* Added changelog fragment
6 years ago
Pierre-Louis Bonicoli 7e278b23b4 inventory plugin order: update doc
add doc for #44428:
- add changelog fragment
- update porting guide
also:
- update auto inventory plugin doc
- mention toml plugin in examples
6 years ago
WhyIsThisOpen 7bdca72713 rhn_register fixes for username and password when unregistering
- Require username and password for unregistering and avoid "cannot marshal None unless allow_none is enabled" error when using an activation key and no channels specified.
- Update test fixtures and add changelog


Co-authored-by: WhyIsThisOpen <WhyIsThisOpen@users.noreply.github.com>
6 years ago
Dave Bendit 8fcf9e1a28 [docker_container] Fixes idempotency checks for network_mode (#49797)
Fixes #49794
6 years ago
Abhijeet Kasurde d36922064b Add support for hex color in slack module (#49804)
Fixes: #11935

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Andrea Scarpino 06099bd116 win_uri: fix body with one item in list (#49484) 6 years ago
Brian Coca daaca1abd5
fix vbox inventory to correclty unset pwfile (#49774) 6 years ago
Sam Doran 7c8af3d684 Reboot - Fix VMware ESXi not working by adding appropriate commands (#49637)
* Add commands for VMware ESXi

* Add changelog
6 years ago
Sam Doran c1589c33c4
Reboot - Fix command not found, add Apline support, fix Solaris command (#49272)
* Fix various bugs related in reboot

- Use format strings for consistency and improve debug log messages
- Use local variables instead of class attributes in order to be thread safe
- Run setup module to get distribution and version
- Run find module to get full path of shutdown command
- Use ansible_os_family and ansible_distribution to find commands and args
- Use same command for all Solaris/SunOS distributions
- Move delay calculations to properties
- Reliably check for module run failure
- Fix bug in run_test_command() that accidentally made the method work properly
- Use better exceptions rather than Exception
- Use dict literals rather than constructors
- Correct _check_delay() so it always returns a value, not None
- Don't store and return result in run_test_command() because it's not used anywhere
- add test for post reboot command that fails
- test negative values for delay parameters
6 years ago
Matt Martz c9040d7579
Don't just raise AnsibleError with the exception message (#49654)
* Don't just raise AnsibleError with the exception message. Fixes #49252

* Add changelog fragment
6 years ago
Brian Coca 8ce4720f44
pear: More info if failure occurs (#49735)
* added cli errors to error msg for pear
6 years ago
Steven Tobias 260512459d stop requiring description. this is not a mandated jira field for all screens (#46023) 6 years ago
Matt Davis 30c611a9cf
add changelog for 46608 6 years ago
Brian Coca b924476d63 updated clog with cve 6 years ago
Abhijeet Kasurde be21140384
VMware: update docs and return docs for vmware_host_service_facts (#49736)
Follow up of 45155

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dag Wieers 7b01725bb5 mail: Fix new breakage on python 2.7 (#49197)
* mail: Fix new breakage on python 2.7

* Add changelog fragment

* Add basic SMTP testing

* Add SMTP integration tests using starttls and TLS
6 years ago
Brian Coca 758ac1846b
match interpreter on stdout also (#49446)
fixes #46980
6 years ago
Brian Coca e53a7856f6
simplify vm_guest detection code (#49378)
- remove a lot of repetition
  - change lists to tuples since they are faster to assign
6 years ago
Brian Coca 42a13d15f1
add path info to role list (#49346)
* add path info to role list

 - use same display format for both listing all and specific roles


Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
6 years ago
Brian Coca 0c1f62065c
make adhoc include_role/task work again! (#49247)
* adhoc include_role/task work again!
  - fix task, pass if set
6 years ago
Brian Coca 70ba960f6d
More specificity in errors for cfg mgr (#48995)
* More specificity in errors for cfg mgr
6 years ago
Brian Coca 20270680fc
fixes to ansible-doc (#47682)
fixes to ansible-doc
 - change json to always be type dependent
 - change changelog generation to loop over the options
 - warn about ignoring module path
6 years ago
Brian Coca ba4c2ebeac
ensure ssh retry respects no log (#49569) 6 years ago
Dag Wieers 37820be05b
aci_rest: Fix ignoring custom port (#49715) 6 years ago
Dario Zanzico b183eb4464 docker_swarm_service: ensure idempotency when the user parameter is None (#49235)
* ensure idempotency for user set to None

* Update `user` documentation and add changelog fragment

* clarify changelog fragments and parameters documentation

* use restructuredtext syntax in changelog fragment
6 years ago
Abhijeet Kasurde c9325ca247
Override help string version (#49545)
This fix adds additional help message to version command options

Fixes: #20488

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Martz 9007dbec2f
Add info about loop based on jinja2 loop var (#42134)
* Add info about loop based on jinja2 loop var

* ansible_loop

* Update test count

* Add extended loop_control that defines whether ansible_loop should be added

* Extended needs to be defaulted

* Revert "Update test count"

This reverts commit f1e93ee469825f4cdcd90fb28667d29aa088275c.

* Add docs about loop_control.extended

* Add revindex and revindex0

* Document ansible_loop in special vars

* Add changelog fragment

* Add tests, change items to allitems so that dot notation works, fix logic error with previtem
6 years ago
Brian Coca 597c258e0e
explain 'bare variables' (#49577) 6 years ago
Matt Martz 3a4d476512
Add now() jinja2 global func for getting the date/time (#43792)
* Add now() jinja2 global func for getting the date/time

* Docs and changelog

* now isn't a lookup, it doesn't need disabled
6 years ago
Dave Bendit 73640a4190 [docker_network] Adding `scope` and `attachable` flags (#49562)
Incorporating the abandoned work from PRs #35288 and #45552. Also adding in
the version checking from `docker_container.py`, which should be abstracted
out to `docker_common.py`.
6 years ago
Matt Martz 69d230f4bf Make squash deprecation messages less misleading (#49551) 6 years ago
Thomas Picariello c8ecac8dc2 Fix google auth scoping for unscoped credentials (#46740)
* Fix google auth scoping for unscoped credentials

* Add changelog fragment
6 years ago
Adam Miller 6f90d62be3 fix py3 scope for unique filter errors, enable filters integration tests on rhel8 beta (#48961)
* fix py3 scope for unique filter errors, enable filters integration tests on rhel8 beta

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

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
uberjew666 b72187cd2c Fixed win_route module (#46395)
* Changed $IpAddress to $Gateway

* Tweaked win_route unit tests

Checks to see if new static route has the correct gateway

* Create win_route.yaml

* Fixed incorrect variable name
6 years ago
Toshio Kuratomi 33f0c1ce22 FactCache changes
* Fix FactCache to conform to the dict API
  * update needs to take a dict rather than a key and a value
  * __init__ needs to allow for setting the intial dictionary
* Remove unneeded _display and _cache attributes
* Move ansible.plugins.cache.FactCache to
  ansible.vars.fact_cache.FactCache because this isn't part of the cache
  plugin API.
* Add backwards compatibility when calling update on the new FactCache
* Remove code for calling old FactCache. There's no way to call the old
  FactCache so there's no need for backwards compatible code for calling
  code.  Backwards compatibility is handling things which are calling
  the new FactCache.
* Port our code to the new FactCache location.
6 years ago
Brian Coca 6096f57880 fix cache 'update' method to be 'mapping' compatible
- also simplify the update functions
 - fix methods and allwow backwards compat with plugins overriding 'update'
6 years ago
Matt Martz 77de219836
Support version 3 of the redis python library (#49445)
* Support version 3 of the redis python library. Fixes #49341

* Document 2.4.5 minimum redis-py version
6 years ago
Ryan Conway aacd22acc6 Fix an issue retrieving some types of 1Password items. (#47213)
* Some types of 1Password items have a 'password' field alongside the 'fields' attribute, not inside it, so we need to search there as well.

* Add changelog fragement for onepassword_facts PR #47213.
6 years ago
Josue David Hernandez 6d42c5020a Fix for changes in clearlinux (#49344)
* Fix for changes in clearlinux

clearlinux is now providing /etc/os-release file and ansible is identifying as NA
then this change allow ansible to find it

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add changelog fragment for clearlinux changes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
6 years ago
chris93111 7c8b5a407d VMware: Add option to modify disk type while cloning template (#47859)
* Add parameters to module vmware_guest for conversion of disk to thin or thick when vm is cloned or deployed with template

* unit test for convert clone vm

Co-Authored-By: chris93111 <christopheferreira@ymail.com>
6 years ago
Toshio Kuratomi c817bef3ae Fix for callback plugins on Python3 when a module returns dictionary keys that aren't strings
This fixes one of the problems reported in https://github.com/ansible/ansible/issues/49343

Upstream Python3 bug for the json traceback:
https://bugs.python.org/issue25457

and PR that may fix it:
https://github.com/python/cpython/pull/8011
6 years ago
mattandes 15c5dbcc20 Fix win_nssm credentials quoting (#48761)
* Fix win_nssm credentials quoting

Fix credential quoting for win_nssm after changes to the way nssm command is invoked in Ansible 2.7.1.

* Updating nssm command to update credentials to use Argv-ToString to properly escape password variable.

* Adding changelog fragment for fix of #48728.
6 years ago
Toshio Kuratomi d06cd869b8 Revert "fix cache 'update' method to be 'mapping' compatible"
This reverts commit 68301f890a.
6 years ago
Sloane Hertel a3e8917b73 [s3_bucket] Handle error paginating object versions when bucket does not exist (#49396) 6 years ago
Toshio Kuratomi a8fbfe1844 Warn if empty string is present in synchronize's rsync_opts 6 years ago
Sam Doran 6200d32c0d Use IndexError in exception (#49488) 6 years ago
Sam Doran 40a5f7bfdf Add better error when k=v syntax is used with YAML in tasks (#41754)
* Add error message for k=v and YAML in a single task

Find the correct line, column, and position for k=v errors since they are different than the position reported initially.

Document bug in quoting syntax check.

* Change tense or error message

Since the error still exists, switch to present tense rather than past tense.

* Remove double spaces after periods in error messages.

http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html

* Add changelog fragment

* Add tests for new error message

* Fix tests

* Add clarifying comments to unit test
6 years ago
Richard Levenberg 5cb39d0d57 Use System.Xml.XmlDocument.Load rather than Get-Content to avoid (#49206)
encoding errors when writing out XML

removing executable bit

refactor tests to handle sanity checking
6 years ago
Jon Bergli Heier 9c02ade536 rabbitmq_binding: Add support for state=absent (#48599)
* rabbitmq_binding: Add support for state=absent

* Add integration tests for rabbitmq_binding

* Update testcases

* Add changelog fragment
6 years ago
Abhijeet Kasurde 1b04571ea0
VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
sdirbach e2f85b3f6c Implement test case prefix to filter test cases (#40174)
* Implement test case prefix to filter test cases

* Cut line to not exceed 160 chars

* Replace tabs with spaces

* Add version_added field

* Include changelog file
6 years ago
Akshay Gaikwad 597e449afe Support for pids_limit parameter in docker_container module (#49319)
* Support for pids_limit parameter in docker_container module

This add pids_limit parameter support in docker_container module

Fixes #43337

Signed-off-by: Akshay <akshay@localhost.localdomain>

* Add changelog for pids_limit parameter

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Remove unnecessary lines of code

The map is needed if the names are different.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Update pids_limit option tests

It also run for docker-py < 1.10.0

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
6 years ago
sdirbach 840ab706ee Implement hide task arguments feature (#40176)
* Implement hide task arguments feature

* Add version_added field

* Include changelog file
6 years ago
Felix Fontein b0c7efcc6b ACME: add diff to acme_account, account_public_key to acme_account_facts, and general refactoring (#49410)
* Only one exit point.

* Refactoring account handling.

* Add diff support for acme_account.

* Insert public_account_key into acme_account_facts result and into acme_account diff.

* Add changelog.
6 years ago
Brian Coca fc71cde7d3
Yaml inventory more tolerant (#48883)
* make yaml inv more tolerant to comments
* add tests for bad inventory processing

fixes #47254
6 years ago
Filippo125 238786c0d3 zabbix inventory: options to read per each host and set ansible_ssh_host (#44107) 6 years ago
Brian Coca 8c43ce491e unsafe cleanup 6 years ago
Adam Miller 378cc9668c dnf module load/init dnf pkg mgr plugins properly (#49278)
* dnf module load/init dnf pkg mgr plugins properly

Fixes #45940

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Martin Krizek c78c8d389f
Last loaded handler with the same name wins (#49249)
* Last loaded handler with the same name wins

* Add comment explaining reversed
6 years ago
Martin Surovcak 87a9ada188 fix module argument to be boolean (#47134) 6 years ago
Lex Rivera aa484c0835 Fix GCE and scaleway VM detection (#47193)
* Fix Google cloud engine & Scaleway VM detection
6 years ago
Matt Martz 77befcf5d7
Do not allow addressing an import from handlers via notify. Fixes #48936 (#49317) 6 years ago
Dusan Matejka a9aa1053a8 zabbix_template: fixed idempotency issues (#49188) 6 years ago
Ryan Brown af6427bf40 VPC peer module unhandled exception on bad peering ID (#45306)
* Improve error handling for VPC peer module when a bad peering-id is specified

* changelog
6 years ago
Ryan Brown 7f7c059a04 ec2_asg: Retry Autoscaling Group delete calls when scaling activity is in progress (#46124)
* Retry delete calls when scaling activity is in progress

* changelog
6 years ago
Felix Fontein b842b1b97e ACME: improve error handling (#49266)
* Improve error handling: when parse_json_result is False, still return the error message.

* Remove content body from info dict.

* Add changelog.
6 years ago
Adam Miller 81540bd754 require git when trying to use it in ansible-galaxy cli (#49212)
* require git when trying to use it in ansible-galaxy cli

Previously we weren't setting `required=True` when calling
`get_bin_path` and the path would return `None`, this would cause
a traceback when attempting to ' '.join() to create a string
representation of the failed command for error output

Fixes #49200

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

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Brian Coca ae2467ddbc Merge pull request #49080 from bcoca/better_invp_skip
more precise pluing skip msg and now in higher verbosity level
6 years ago
Martin Krizek d4568d97d4 Fix using vault encrypted data with jinja2_native (#49025)
Fixes #48950
6 years ago
Martin Krizek abdf46803b
Warn about falling back to jinja2_native=false (#49063) 6 years ago
Matt Davis 8c1f701e6e
split PS wrapper and payload (CVE-2018-16859) (#49142)
* prevent scriptblock logging from logging payload contents
* added tests to verify no payload contents in PS Operational event log
* fix script action to send split-aware wrapper
* fix CLIXML error parser (return to -EncodedCommand exposed problems with it)
6 years ago
Brian Coca 89b7e10436 updated var docs (#48957)
* updates var docs, fixes #48949

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
6 years ago
Martin Krizek 48ffd8789f
Properly handle FieldAttribute.default if callable (#48992)
* Properly handle FieldAttribute.default if callable

Fixes #48673

* Add changelog...

* Add integration test

* Add aliases file
6 years ago
Felix Fontein 9caaf7b109 docker_container: fix init option idempotency with old docker-py versions (#49078)
* Don't check options for idempotency which are not supported.

This check should be superfluous if every option would adhere to
the convention that options not specified should have value None.
Unfortunately, some options (such as init) which correspond to
container properties have an explicit default set.
6 years ago
Will Thames 31ccb3c29d Diff mode returns yaml diffs in yaml callback plugin (#48794)
* Diff mode returns yaml diffs in yaml callback plugin

* Add changelog for yaml diff mode
6 years ago
Will Thames 960ebd981f k8s append_hash (#48830)
* Add append_hash functionality to k8s module

append_hash adds a hash based on the contents of a ConfigMap
or Secret to the name - this enables immutable ConfigMaps and
Secrets.

* Provide k8s_config_resource_name plugin

The k8s_config_resource_name filter plugin provides a means of determining
the name of ConfigMaps and Secrets created with append_hash

* Add changelog fragment

* fix failing tests

* Update openshift version needed for append_hash
6 years ago
Jordan Borean a568bbed3c
win_mapped_drive - refactor module and docs (#48642)
* win_mapped_drive - refactor module and docs

* Updated code to work with become and split tokens

* use win_credential_manager instead of cmdkey

* updated credential manager module name

* harden the system token impersonation process
6 years ago
Rémy Léone 959395f4b4 Fix getheaders regression with open_url in Scaleway dynamic inventory (#48671)
* Fix regression

* Improve changelog fragment
6 years ago
Matt Martz 9773a1f289
Add a Singleton metaclass, use it with Display (#48935)
* Add a Singleton class, use it with Display

* update six import

* Move remaining failes to display singleton

* Fix rebase issues

* Singleton improvements

* Add code-smell for 'from __main__ import display'. ci_complete

* s/self/cls/g

* Add docs for no-main-display

* Address linting issues

* Add changelog fragment. ci_complete

* Implement reentrant lock for class instantiation in Singleton

* Add Display singleton porting guide
6 years ago
Matt Martz 64bb54dab4 Catch per loop label templating exceptions. Fixes #48879 (#48896) 6 years ago
Michael Rose 0886c20d19 influxdb_user - Allows updates to user privileges (#46667)
* influxdb_user - Allows updates to user privileges

* influxdb_user - Updated documentation for admin roles
6 years ago
Jordan Borean 9b0dd5224b
win_security_policy - add warning when using this module ot edit rights (#48850) 6 years ago
Brian Coca 68301f890a fix cache 'update' method to be 'mapping' compatible
- also simplify the update functions
 - fix methods and allwow backwards compat with plugins overriding 'update'
6 years ago
Adam Miller 4a06e95671 dnf to support modularity module appstream specs
Fixes #48743

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Brian Coca 652da82558 fix bug in config mgr
- use function that creates config slots as needed
6 years ago
Brian Coca 87e44a7ed1
better handling of bad type in config (#48821)
* better handling of bad type in config

 fixes #22468, fixes #22476
6 years ago
Felix Fontein 891687284f docker_* modules: improve diff (#48546)
* Add difference tracking tool

* Improve --diff mode for docker_container.

* Improve diffs of sets by ordering the sets.

* Rewrite imports, get rid of HAS_DOCKER_PY_x variables and use docker_version instead.

* Rename container -> active (more generic).

* Add --diff for docker_volume. Change old diff output.

* Add --diff for docker_network. Change old diff output.

* Add --diff for docker_swarm_service.

* Add changelog.

* Add entry for porting guide on docker_network and docker_volume.
6 years ago
jhawkesworth 361acd3547 win_say: Port to use CSharpUtil AnsibleBasic (#48361)
* port win-say to use CSharpUtil AnsibleBasic and add warning when requested voice not found

* win_say: fixes following code review: use C# style properties consistently; prefix changelog fragments

* fix invalid yaml in change log fragment

* win_say: fixes following code review: use generic module parameter validation where possible

* remove redundant setting of Result.changed to false, simplified some logic for readability.

* fix serialisation issue when message text is drawn from a file; allows tests to be run not in check mode and fix up some test descriptions
6 years ago
Will Thames aaf29c785f Provide Kubernetes resource validation to k8s module (#43352)
* Provide Kubernetes resource validation to k8s module

Use kubernetes-validate to validate Kubernetes resource
definitions against the published schema

* Additional tests for kubernetes-validate

* Improve k8s error messages on exceptions

Parse the response body for the message rather than returning
a JSON blob

If we've validated and there are warnings, return those too - they
can be more helpful

```
"msg": "Failed to patch object: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},
       \"status\":\"Failure\",\"message\":\"[pos 334]: json: decNum: got first char 'h'\",\"code\":500}\n",
```
vs
```
"msg": "Failed to patch object: [pos 334]: json: decNum: got first char 'h'\nresource
        validation error at spec.replicas: 'hello' is not of type u'integer'",
```

* Update versions used

In particular openshift/origin:3.9.0

* Add changelog for k8s validate change
6 years ago
Xaroth 87d10b9b78 Include dependency role names in `role_names`. (#46483)
* -Change: Include dependency role names in `role_names`.
-Add: `play_role_names` magic variable to include only explicitly named roles (formerly `role_names`).
-Add: `dependent_role_names` magic variable to include all dependency names for all roles.

* -Change: use the ansible_ prefix for new magic variables.
-Change: keep `role_names` as a deprecated variable, using the old functionality.

* -Add: changelog fragment for the role_names rework.

* -Add: Tests for the role_names (and ansible_*role_names) special variables

* -Fix: resolve erroneous documentation snippet that was introduced after rebasing.

* -Fix: explicitly sort to ensure list comparison works in test.
6 years ago
René Moser c7c3ca1c41 cs_template: fix KeyError on state=extracted (#48675)
* cs_template: fix KeyError on state=extracted

* add changelog
6 years ago
Martin Krizek 907ff2f26c Add new meta task end_host (#47194)
* Add new meta task  end_host
6 years ago
Brian Coca 24593f2ffb avoid spurious warnigns on unique filter
fixes #46189
6 years ago
Jordan Borean 9ac89af355
win_chocolatey - move over to AnsibleModule and add allow_multiple (#48370) 6 years ago
Jordan Borean 6898f02431
win_shortcut: add run as admin and fix shell folder idempotency (#48584) 6 years ago
Adam Miller 34fc66185e make yum update_only option actually work (#47942)
* make yum update_only option actually work

Fixes #40615

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

* fix changlog fragment for sanity check

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

* only attempt an update when there are packages to update

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

* fix logic to properly handle the precedent of operations

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

* remove q debug statements

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Felix Fontein b1acabcd03 docker_container: fix tests and idempotency for init and shm_size (#48551)
* Fix tests: use same command if not testing command option.

* Fix idempotency of init option.

* Fix shm_size idempotency (it is included in inspect results from docker API version 1.22 on).

* Add changelog.
6 years ago