Commit Graph

388 Commits (42be0bd65529af3fefd6fef131db74ab2c07cfd4)

Author SHA1 Message Date
Toshio Kuratomi 8a240ed54d [stable-2.7] Fix password lookup for FIPS
Fixes #47297
(cherry picked from commit 9906daa)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Abhijeet Kasurde 1293076d7b plugin_filter: check for type error (#46664)
* Parsing plugin filter may raise TypeError, gracefully handle this exception
and let user know about the syntax error in plugin filter file.

* Test for plugin_filtering

Fixes: #46658

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit b32b4111b2)
6 years ago
Martin Krizek 44088ef64d yum: fix 'package == version' syntax (#47744)
(cherry picked from commit 4b8f2c99d2)
6 years ago
Abhijeet Kasurde 009a3b34bc VMware: correct logic to pass ESXi SSL thumbprint (#47600)
Due to refactoring of task_error and wait_for_task method,
SSL thumbprint was lost in error message. This fixes the
retry mechanism of AddHost task.

Fixes: #47563

(cherry picked from commit e7c83d6aa9)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Felix Fontein 08324198da docker_container: improve race condition behavior for detach:no, auto_remove:yes behavior (#47712)
* Don't die when get_container is called for container which is terminating during get_container call.

If it terminates between client.containers() and client.inspect_container(),
the module will fail with an error such as
    Error inspecting container: 404 Client Error: Not Found ("No such container: xxx")

* Add changelog.

(cherry picked from commit b9706e2ff5)
6 years ago
John R Barker 5bacb732ce Backport/2.7/44324 Fixes #30599 ini_file module: Options within no section managed (#47741)
* Addresses comments in #38971 (#44324)

* Controlled params within no section

* Added tests to control params within no section

* Cleaning output_file before creating no-section params and check the content

* addresses comment in PR "s/hate/beverage/g"

(cherry picked from commit d3fe6c01f2)

* 44324-ini_file
6 years ago
Abhijeet Kasurde f94ee89545 VMware: restore timeout in set_vm_power_state operation (#47723)
'state_change_timeout' parameter was removed, this introduced
regression.

Fixes: #47722

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a87a62ba8a)
6 years ago
Matt Martz 414ee4759d [stable-2.7] Add missing self._supports_async to uri action plugin (#47677)
* Add missing self._supports_async to uri action plugin. Fixes #47660

* Additional changes needed to support async

* Missed a call to execute_module
(cherry picked from commit 3633e21)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Ondra Machacek 6cf1814105 ovirt_host_pm: Fix to powermanagement module (#47659)
This PR is fixing following issues:

 1) Don't try to check password.
 2) Check options.
 3) Order wasn't adding at the end, as doc says.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Jim Gu 853236d650 VMware: Avoid misleading PyVmomi error if requests import fails
* Avoid misleading PyVmomi error if requests import fails

Requests is imported by the VMware module_utils as an external
dependency; however, because it is in a try/catch block containing the
imports for PyVmomi, if requests fails to import properly, Ansible will
instead complain about PyVmomi not being installed.

By moving the import outside of the try/catch block, if requests fails
to import, an error like the following will be returned:

    ImportError: No module named requests

This should result in less confusion.

* catch requests ImportError

Signed-off-by: Jim Gu <jim@jimgu.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 99ee30768a)
6 years ago
Abhijeet Kasurde b8cc4a3046 doc: Scenario guide for VMware HTTP API usage (#47686)
This adds scenario guide for using VMware HTTP API using uri module.

(cherry picked from commit e5318c5c4f)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ondra Machacek 0dc15986c2 ovirt_host_network: Fix type conversion
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Martin Krizek f17cd83826 2.7: adds 'success_msg' to valid args for assert module (#47030) (#47584)
* adds 'success_msg' to valid args for assert module (#47030)


(cherry picked from commit 0661f2f213)

* Add changelog
6 years ago
Nathaniel Case ffe80a14f6 [2.7] ios check_rc: Default to sending text of exception, not the whole exception (#47300)
* Default to sending text of exception, not the whole exception
(cherry picked from commit 6a866a5)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
6 years ago
Florian Apolloner be05dcdbfb Backport/2.7/46157 (#47558)
* Changed django_manage to return changed as boolean consistently (#46157)


(cherry picked from commit ecdcb6a09f)

* Added changelog for previous change.
6 years ago
Toshio Kuratomi c963ef1dfb New release v2.7.1 6 years ago
Will Thames 1c9551f93d Use kubeconfig if either context or kubeconfig is set (#47373) (#47496)
* Use kubeconfig if either context or kubeconfig is set (#47373)

kubeconfig should be loaded if *either* or both of context
or kubeconfig is set (this allows picking a context and default
kubeconfig or picking a kubeconfig with default context)

Fixes #47149

(cherry picked from commit 00ccad9764)

* Add changelog for k8s auth config fix
6 years ago
Dag Wieers 136da25bbf WinRM/PSRP: Ensure shell returns UTF-8 output (#47404)
* WinRM/PSRP: Ensure shell returns UTF-8 output

This PR makes UTF-8 output work in PSRP shells.

* Add win_command and win_shell integration tests

* Fix tests

* more test fixes

(cherry picked from commit 691ff4b9e6)
6 years ago
Jordan Borean 1626b4c5cb psrp - fix unicode handling in Python 2 (#47461)
* psrp - fix unicode handling in Python 2

* skip psrp become test when on Server 2008

(cherry picked from commit f28b7c7ab1)
6 years ago
Adam Miller 96b57a5c7a dnf properly gpg check local packages based on param (#47455)
* dnf properly gpg check local packages based on param

Fixes #43624

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 079705f8da)
6 years ago
Adam Miller 916b1e34bd don't restrict disable_excludes choices incorrectly (#47453)
* don't restrict disable_excludes choices incorrectly

Fixes #47085

(cherry picked from commit 0e3e646189)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Matt Martz 8a40514d2b [stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372 (#47510).
(cherry picked from commit f6ecdf0b87)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Matt Martz 376b199c05 [stable-2.7] Ensure we don't overwrite roles from include/import_role when loading the play (#47512)
* Ensure we don't overwrite roles from include/import_role when loading the play. Fixes #47454

* Add changelog fragment
(cherry picked from commit d5e4f37)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Nathaniel Case 18f07e828e [2.7] escape default prompt detection in telnet action plugin (#46573) (#47440)
* [2.7] escape default prompt detection in telnet action plugin (#46573)

This change fixes an issue with the default prompt handling.  The value
needs to be escaped otherwise it does not work when converted to bytes.
(cherry picked from commit 9180d2c)

Co-authored-by: Peter Sprygada <privateip@users.noreply.github.com>

* Add changelog
6 years ago
Ondra Machacek a9128b9fb0 ovirt_vm: Check next_run configuration update if exist
This PR fixes the update check method so it now check also the next_run
configuration of the virtual machine if it exists.

So if previously the VM was updated with new parameters, and then reset
back, the module didn't set the parameters to be set back in next_run.
This PR fixes it so the next run configuration is set back with proper
parameters.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1639894
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Sviatoslav Sydorenko 702820d673 [stable-2.7] Fix problem where pip module cannot accept multiple extras (#47449)
* [stable-2.7] Fix problem where pip module cannot accept multiple extras

PR #46937
Fixes #46519
(cherry picked from commit b697da3)

Co-authored-by: Zhikang Zhang <zzhang63@ncsu.edu>

* Add changelog
6 years ago
Nathaniel Case 238939b523 [2.7] fix error checking if netns exists (#47397) (#47441)
* [2.7] fix error checking if netns exists (#47397)

This patch fixes an error that occurs when attempting to see if the
netns already exists on the remote device.  This change will now execute
`ip netns list` and check if the desired namespace is in the output.

Signed-off-by: Peter Sprygada <psprygada@ansible.com>
(cherry picked from commit 299a5e4)

Co-authored-by: Peter Sprygada <privateip@users.noreply.github.com>

* Add changelog entry
6 years ago
Dan b5a887aa5e Fix nxos_ospf_vrf module auto-cost idempotency and module check mode (#47190)
* fixing idempotency and check mode

* modified to avoid repetitive code

(cherry picked from commit dcb35c4270)
6 years ago
Trishna Guha 039cde8460 Add changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Felix Fontein f0a706e4a0 docker_container: fix interaction of detach:no with auto_remove:yes (#47396)
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.

* Add tests.

* Added changelog.

(cherry picked from commit 3afdb28209)
6 years ago
Felix Fontein cb347c2096 [2.7] Fixes #33045: get existing containers in a network via inspect_network (Rebased #33048) (#47472)
* Fix #33045: get existing network via inspect_network (Rebased #33048) (#43997)


(cherry picked from commit 2939f68897)

* Add changelog.
6 years ago
Felix Fontein f4081c2d97 docker_container: warn if ipvX_address is used for networks but not supported by docker-py (#47395)
* Only add parameters which are actually used.

* Fail if ipvX_address is used when not supported.

* Added changelog.

(cherry picked from commit 4ffe3b14d4)
6 years ago
bverschueren 719b99a96e ovirt_host_network: check for empty user_opts (#46695)
Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Nijin Ashok c91139bde3 ovirt_vm: Fix issue in SSO option
Currently the module will disable the SSO if we didn't pass any
value for SSO option. The PR fixes the same.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Felix Fontein 1d60d34b82 Fix option change detection / force support for docker_volume. (#47390) 6 years ago
Dusan Matejka 816eee2c1e [2.7] zabbix_host: backport of #46521 (#47477)
* zabbix_host: fix link template error (#46521)

* add host interface before link template

(cherry picked from commit 5a35907b71)

* added changelog
6 years ago
Ganesh Nalawade 47f2352d33 Fix prompt mismatch issue for ios (#47004)
* Fix prompt mismatch issue for ios

Fixes #40884 #44463 #46082

*  If the command prompt is matched check if data is
   still pending to be read from buffer.
*  This fix adds a new timer `buffer_read_timeout`
   which will be trigerred after command prompt
   is matched and data is attempted to be read from channel.
   If not data is present of channel the timer will expire
   and response we be returned to calling function.

* Update doc

* Fix review comments

* Update changelog

* Fix unit test CI failure

(cherry picked from commit 335a979f1d)
6 years ago
Adam Miller 2d39ad036e fix yum proxy username/password handling (#47435)
* fix yum proxy username/password handling

Fixes #46249

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit e4a4357322)

* add backport changelog
6 years ago
Ondra Machacek c204214df4 ovirt_vm: Fix initialization of cloud init
Fixes: https://github.com/ansible/ansible/issues/45900

This PR fixes the case when the cloud_init_persist was used, but we
still sent use_cloud_init=False, which is in oVirt API evaluated as not
to use cloud_init in first VM execution. This patch is changing it to
send just None, instead of False.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Nijin Ashok 025c183307 ovirt_vm: Fix issue in setting the custom_compatibility_version to NULL
Currently there is no way to reset the custom_compatibility_version to
NULL. If we provide a empty string('') to custom_compatibility_version,
it will fail with error "IndexError: list index out of range" at _get_minor
function.

To reset the custom_compatibility_version, we have to pass None value to
types.Version. The PR fixes the same.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
6 years ago
Toshio Kuratomi 3b2a0de548 [stable-2.7] Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
This reverts commit 0e933f76ba.

The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform.  Tests need to be rewritten.
(cherry picked from commit ccabc2bff5)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Yuwei Zhou ab1834f035 Fix auto scale create with fix date without recurrence (#47186) (#47258)
* Fix auto scale create with fix date without  recurrence (#47186)

* Fix auto scale create with fix date without  recurrence

* fix indent

(cherry picked from commit 9258ffa478)

* Create azure_rm_autoscale-fixed_date.yml changelog
6 years ago
Will Thames bac6f99608 Ensure that k8s_facts always returns resources key (#46733) (#47253)
* Ensure that k8s_facts always returns resources key (#46733)

Fix bug returning `items` key if NotFound exception is hit

(cherry picked from commit b772485d97)

* Add changelog for k8s_facts fix
6 years ago
Daniel Shepherd 1a4604361f pamd: add delete=False to NamedTemporaryFile() (#47281)
* add delete=False to NamedTemporaryFile and remove print statement from module

* add changelog fragment

* use module.tmpdir from (#47133) and add changelog fragment for it as well

(cherry picked from commit c67ab296bb)
6 years ago
Martin Krizek b618339c32 2.7: user: do not pass ssh_key_passphrase on cmdline (#47445)
* user: do not pass ssh_key_passphrase on cmdline

CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit a0aa53d1a1)

* Ignore user module use of subprocess.

(cherry picked from commit 8d00afc013)

* Fix python3 problem in user module cve fix

(cherry picked from commit 9088671c4e)

* Fix changelog entry for user module CVE fix

(cherry picked from commit 210a43ebeb)
6 years ago
Adam Miller b14c45a16c Handle dnf immutable mutable datatypes (#47434)
* Handle dnf immutable mutable datatypes

In DNF < 3.0 are lists, and modifying them works
In DNF >= 3.0 < 3.6 are lists, but modifying them doesn't work
In DNF >= 3.6 have been turned into tuples, to communicate that
modifying them doesn't work

Further explanation of this is available via Adam Williamson from
the Fedora QA Team.

    https://www.happyassassin.net/2018/06/27/adams-debugging-adventures-the-immutable-mutable-object/

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 70025e7b56)

* add backport changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Toshio Kuratomi 7812c065f4 Revert "Fix prompt mismatch issue for ios (#47004)"
This reverts commit 17cd01589a.

This commit was not passing CI.  Reverting
6 years ago
Dag Wieers 44ae37d78b mail: Fix regression when sending mail without SSL (v2.7) (#47019)
* mail: Fix regression when sending mail without SSL (v2.7)

When this module was refactored in #37098 the non-SSL use-case was broken.

The main cause is that we have no way to do integration tests for testing SMTP.

This is a back-port to v2.7 of #46403

* Add changelog fragment
6 years ago
Matt Martz 0e933f76ba [stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372.
(cherry picked from commit c58de75f38)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Pablo ce16286dee [stable-2.7] Fix exception when including tasks from handlers (#47307)
Set _notified_handlers for the task's _uuid that is run as a handler

Fix #47287
(cherry picked from commit 6497049)

Co-authored-by: Pablo <pablorf.dev@outlook.com>
6 years ago
Ganesh Nalawade 17cd01589a Fix prompt mismatch issue for ios (#47004)
* Fix prompt mismatch issue for ios

Fixes #40884 #44463

*  If the command prompt is matched check if data is
   still pending to be read from buffer.
*  This fix adds a new timer `buffer_read_timeout`
   which will be trigerred after command prompt
   is matched and data is attempted to be read from channel.
   If not data is present of channel the timer will expire
   and response we be returned to calling function.

* Fix unit test failure

* Update to make buffer timeout float

* Update doc and fix review comment

* Fix CI issues

* Update doc

* Fix review comments

* Update changelog

(cherry picked from commit 335a979f1d)
6 years ago
Martin Krizek 57c25636d8 2.7: yum/dnf: fail when space separated string of names (#47109) (#47414)
* yum/dnf: fail when space separated string of names (#47109)

* yum/dnf: fail when space separated string of names

* Groups allow spaces in names

(cherry picked from commit e8b6864e21)

* Add changelog
6 years ago
Jonathan Oddy d130c166ad Fix AWS EC2 inventory plugin caching of groups (#46961)
* Fix AWS EC2 inventory plugin caching of groups

* Added changelog fragment for aws_ec2 caching fix

* Store the AWS query results

The underlying inventory object contains inventory from other sources,
so caching it as ours would be wrong.
It seems easiest and safest to just cache the boto query results
instead.

* Remove unused functions

(cherry picked from commit 7ba09adee1)
6 years ago
Dag Wieers 5a0e016b4b psexec: Handle socket errors (Connection timeout) (Backport) (#47407)
* psexec: Handle socket errors (Connection timeout)

This ensures we get a nicer error message from psexec.

* Add changelog fragment
6 years ago
Jordan Borean a636562818 psexec: better error on import failure (#47327)
(cherry picked from commit 013c44484a)
6 years ago
Felix Fontein 69568b4ca8 [2.7] docker_container: fix memory_swappiness documentation (#47378)
* Documentation for docker_container: fix documentation for memory_swappiness. Default value will not equal 0, it will be inherited from the host machine (#47296)


(cherry picked from commit 4c2efa4b67)

* Add changelog.
6 years ago
Nathaniel Case 7d936c12fd [2.7] Update some cliconf plugins (#47141) (#47310)
* [2.7] Update some cliconf plugins (#47141)

* Add `check_all` to many community cliconf plugins
(cherry picked from commit 7844a40)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* Add changelog entry
6 years ago
Matt Martz f1db8985e3 [stable-2.7] Don't use the task for a cache, return a special cache var (#47243)
* Don't use task to cache loop results, use hostvars. Fixes #47207

* Avoid a race condition, supply _ansible_loop_cache through get_vars directly

* Add tests

* Add changelog fragment

* Remove unnecessary copy

* Remove unnecessary host from _get_delegated_vars signature.
(cherry picked from commit 77d32b8f57)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Martin Krizek 46c217feda Do not strip new lines in native jinja (#46751)
* Do not strip new lines in native jinja

* Add changelog/fragment

(cherry picked from commit 541255a2d8)
6 years ago
Felix Fontein f7c5c466be Add changelog. 6 years ago
Per-Henrik Lundblom d82c5fb55f [aws] ec2_vol_facts: only access volume tags when set (#46801)
(cherry picked from commit e744c83808)
6 years ago
Jordan Borean 7690659f7f openss: fix various test and Python 3 issues (#47188)
(cherry picked from commit 6666b070a9)
6 years ago
Dani Hodovic 28ed7f722e docker_service: parse scale parameter correctly to 2.7 (#47239)
* fix: Parse docker_service scale parameter to int (#45508)

* Changelog: add fragment for docker_service scale fix
6 years ago
Fran Fitzpatrick 24d7ccd182 Backport: junos terminal regex prompt fix to v2.7 (#47203)
* Fix junos terminal regex (#47096)

Fix junos stdout regex

Change at hing

(cherry picked from commit fc341e01fa)

* Changelog: adds fragment for junos fix terminal
prompt regex

* Proper yaml formatting
6 years ago
Jordan Borean 20fc17a55f postgresql_user: fix test errors on newer Fedora versions (#47166)
(cherry picked from commit dd46f953f6)
6 years ago
Matt Martz 20c1cf41a4 [stable-2.7] Use the copied and merged task for calculating task vars in the free strategy. Fixes #47024 (#47060)
(cherry picked from commit c3d5779)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Brian Coca b2381cfac9 fixes to ansible-doc (#47209)
* 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

(cherry picked from commit fce9673ac1)

* An earlier optimization of ansible-doc -l caused failures. (#47012)
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

(cherry picked from commit 61ae6424a3)
6 years ago
Jonathan Oddy 60e7f43998 [stable-2.7] 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.
(cherry picked from commit f2dccb9)

Co-authored-by: Jonathan Oddy <jonathan.oddy@transferwise.com>
6 years ago
Ganesh Nalawade da07b58c3b Fix in confirmed_commit capability in netconf_config modules (#46964)
* Fix in confirmed_commit capability in netconf_config modules

Fixes #46804

*  If confirm value is greater than zero or confirm_commit option is set and confirmed-commit
   capability is not supported but Netconf server only in that case fail the module

* Update confirm-commit flag

* Update changelog

(cherry picked from commit 5394638047)
6 years ago
Gustavo Muniz do Carmo 977f094741 Fix iterator to list conversion in ldap_entry module
PR #45778 fixes #45417

(cherry picked from commit 7a747341fb)
6 years ago
Zim Kalinowski f16bb4daf4 Fixing assigning ssl certificate to http listener in app gateway (#45… (#46027)
* Fixing assigning ssl certificate to http listener in app gateway (#45830)

* fixed ssl certificate reference

* modified test

(cherry picked from commit 83645963fb)

* added chagelog
6 years ago
Brian Coca e841e7b53d use ansible json encoder for results in callbacks (#46830)
* use ansible json encoder for results in callbacks

(cherry picked from commit 643ff29d2d)
6 years ago
Brian Coca 97a3e59ce8 better information for user from inventory plugins (#46766)
* better information for user from inventory plugins

 - use foreman as example



(cherry picked from commit 9e0c2a658f)
6 years ago
Matt Martz 30c1a1933e [stable-2.7] Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833).
(cherry picked from commit a06a5ded61)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Peter Oliver dcc37b6eb9 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().

(cherry picked from commit 40fb992a6f)
6 years ago
Abhijeet Kasurde c982295f6c VMware: Refactor disc logic (#39285)
* Refactoring related to network device
* Assign unique random temporary key while creating SCSI or/and IDE controller devices
* Add testcase for this change

Fixes: #38679

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit fd985db72d)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dominik Holler 9a2e192e8a Fix os_router ignores enable_snat: no (#45921)
If enable_snat is False, this should be used to build the
request, because the default value in the OpenStack Networking
API is True.

Fixes the issue #45915.

(cherry picked from commit 452a4ab781)
6 years ago
Adam Miller f5df17ca51 yum module properly check for None config_file (#46641) (#46820)
* yum module properly check for None config_file (#46641)

* yum module properly check for None config_file
* add conf_file test cases to yum integration tests

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

(cherry picked from commit fb6e91bf98)

* add changelog for 2.7 backport

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Ryan Brown d46ed88fa3 [aws] Fix IAM role name parsing to come from the ARN (#46076)
* [aws] Change IAM role name parsing to come from the ARN (#45534)

(cherry picked from commit fe6b7f6b5d)

* Changelog
6 years ago
Adam Miller 4fe7671d34 yum module handle list optional empty strings properly (#46634) (#46819)
* yum module handle list optional empty strings properly (#46634)

Fixes #46517

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit ad405fc21e)

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Brian Coca f3b5e0359f manage levels for 'multiple included lists' (#46359)
* manage levels for 'multiple included lists'

fixes #46343

(cherry picked from commit 80d977bac6)
6 years ago
Sloane Hertel e9d42babbf [aws_ssm_parameter_store] use describe_parameters paginator (#45632) (#45666)
* [aws_ssm_parameter_store] use describe_parameters paginator (#45632)

Fix the service reaching an internal limit while processing the results and returning unexpected data
(cherry picked from commit 7aaa5da41d)

* changelog
6 years ago
Andrea Tartaglia ebc35bd79f [2.7] nmcli: backport of #42415 (#46814)
* nmcli: fix vlan connection modification Fixes #42322 (#42415)

* ensure optional items are set to empty strings rather than not presented
fix syntax of vlan modification command

* extended tests for nmcli

(cherry picked from commit fb72a5424c)

* Changelog fragment for nmcli fix
6 years ago
Ganesh Nalawade 42183e562a Fix netconf module_utils dict changed size issue (#46778)
Fixes #46755

Use list() to copy the keys of attribute dict
while iterating over attribute dict.

(cherry picked from commit 58aaf53271)

Update Changelog
6 years ago
Sam Doran 4546057fc8 Backport #46360 for 2.7 - Fix for ignore post_reboot_delay (#46510)
* win_reboot: Fix for ignore post_reboot_delay (#46360)

* win_reboot: Fix for ignore post_reboot_delay

This fixes an issue where win_reboot would be ignoring the provided
post_reboot_delay (and on Windows timing/waiting is everything!)

This must be backported to the v2.7 branch.

* Merge post-reboot handling into run()

(cherry picked from commit 8c64b4af7c)

* Add a changelog for the win_reboot fix
6 years ago
Nilashish Chakraborty 0e48544ae1 Backport 2.7: Return correct version on installed VyOS (#39115) (#46730)
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f681)

* Added changelog
6 years ago
Felix Fontein 4ffc75ab44 docker_container: fix problem with published_ports idempotency (#46595)
* Fix comparisons for expected_ports (set vs dict).

* Added changelog.

(cherry picked from commit c5ea3d058e)
6 years ago
Felix Fontein 10fd0251e8 docker_container: improve publish all ports functionality (#46594)
* Improve handling of published_ports: all.

* Add changelog.

(cherry picked from commit 8afe46dc02)
6 years ago
Daniel Jakots a0f38bdab5 Register missing parameter reboot_timeout (#46585)
(cherry picked from commit 753711cd12)
6 years ago
Vlad Mencl 83194a0a99 module/systemd: fix logic determining if a service needs to be enable… (#46318)
* module/systemd: fix logic determining if a service needs to be enabled (#46245)

* modules/systemd: fix logic: allow scope to default to 'system'

Fix logic introduced in 7ea909418e5: if 'scope' param is not specified,
it defaults to system, but the value of module.params['scope'] is None,
not 'system' - so allow for that.

* modules/systemd: fix logic: disabled means disabled

Fix logic determining whether a service with both systemd and initd files is enabled or disabled.

In situations where systemd thinks service is disabled, but rc.d symlinks mark it as enabled,
this module wrongly assumes the service is enabled.

Fix this logic: disabled means disabled

Only when the output from does NOT include disabled, consider the status of rc.d symlinks.

This essentially replicates the fixes done to the systemd handling in the "service" module in 3c89a21e0c

Fixes #22303

Fixes #44409

(cherry picked from commit ef131c7556)

* backport/2.7/46245: add changelog fragment
6 years ago
Daniel Jakots 26de4f9749 Add support for OpenBSD (#46147)
(cherry picked from commit 2769a4e2cc)
6 years ago
René Moser 083d2a6ad7 [2.7] backport cs_instance fixes (#46274)
* cs_instance: doc: fix typo in examples (#46035)


(cherry picked from commit c09b785a66)

* cs_instance: fix host migration without volume (#46115)


(cherry picked from commit e7926cf9f4)

* add changelog fragment
6 years ago
Felix Fontein c481a5bf4a [2.7] route53: fix CAA record ordering for idempotency (#46227)
* [aws] route53 module: fix idempotency for CAA records  (#46049)

* Fixing record order for CAA records to properly handle idempotency.

* Add integration tests that reproduce CAA failure

(cherry picked from commit a727a1ee67)

* Added changelog.
6 years ago
Felix Fontein 1d01543e34 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
Nathaniel Case b1b93c7a22 [2.7] Clean up after ansible-connection if failure occurred in start() (#45930)
* [2.7] Clean up after ansible-connection if failure occurred in start() (#45929)
(cherry picked from commit 0d143ed)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* Add changelog fragment
6 years ago
Matt Martz cf28d22211 [stable-2.7] Support transfering empty files to target host. Fixes #36725 (#45751)
(cherry picked from commit b6fcbfe)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Pieter Avonts 190cdd3a29 VMware: Rewrite get_resource_pool method for correct resource_pool selection (#39792)
* rewrite get_resource_pool method for correct resource_pool selection
* only keep name if path is given for cluster, esxi_hostname or resource_pool
* Revert "only keep name if path is given for cluster, esxi_hostname or resource_pool"
* This reverts commit 50293ec763c024b0eaceac5d775ccc0ad3ff8bd7.
* if the name argument contains a path, only use the last part for matching
* remove path from cluster argument in tests
* remove find_objs in favour of reusing find_obj with an extra folder argument
* fix find_obj ignoring first if name is not given

(cherry picked from commit 1a810f8f11)
6 years ago
Felix Fontein ccde3dc66b 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.

(cherry picked from commit 895019c59b)
6 years ago
Tobias Wolf ee523beb8e [rabbitmq_binding] Fix the quoting of vhost and other names (#45109)
* [rabbitmq_binding] Fix the quoting of vhost and other names, which was broken in PR #35651
* Merge missing urllib_parse.quote from PR #42422
* Missed one line, where  also needs to be escaped, i.e., the destination

(cherry picked from commit d5f8738bf2)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jordan Borean 93b75558bb azure_rm_common: use __version__ from module_util (#46184)
(cherry picked from commit 02c11e6b51)
6 years ago