Commit Graph

509 Commits (30824c92e6954daea4d47794ea652467c10b3d9d)

Author SHA1 Message Date
Ganesh Nalawade 47e0d29a59 Fix iosxr netconf plugin response namespace (#49238)
* Fix iosxr netconf plugin response namespace

*  iosxr netconf plugin removes namespace by default
   for all the responses as parsing of xml is easier
   without namepsace in iosxr module. However to validate
   the response received from device against yang model requires
   namespace to be present in resposne.
*  Add a parameter in iosxr netconf plugin to control if namespace
   should be removed from response or not.

* Fix CI issues

* Fix review comment

(cherry picked from commit 829fc0feda)
6 years ago
AlanCoding fb39299578 Fix error where pod has error and no containers
(cherry picked from commit 865430e3e0)
6 years ago
Trishna Guha 6ba1330191 changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Adam Miller eafc7fc531 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>
(cherry picked from commit 81540bd754)
6 years ago
Abhijeet Kasurde 6dba96c8cc Added changelog after review 6 years ago
Martin Krizek 5340549506 Warn about falling back to jinja2_native=false (#49063)
(cherry picked from commit abdf46803b)
6 years ago
Martin Krizek 660f46be13 Fix using vault encrypted data with jinja2_native (#49025)
Fixes #48950

(cherry picked from commit d4568d97d4)
6 years ago
Jonathan Hanson ba45d8a248 Fix type in ansible-galaxy info output (#49096)
Changed from 'intalled_version' to 'installed_version'

(cherry picked from commit 12a573a7db)
6 years ago
Toshio Kuratomi 81879e9792 New release v2.7.4 6 years ago
Jordan Borean 86947e6b9a powershell - add bootstrap wrapper to packaging manifest 6 years ago
Toshio Kuratomi c3c4bd2cfb New release v2.7.3 6 years ago
Sviatoslav Sydorenko cee7642188 [stable-2.7] pip: Fix the mistake replacement from 'distribute' to 'setuptools' (#47403) (#49132)
* [stable-2.7] pip: Fix the mistake replacement from 'distribute' to 'setuptools' (#47403)

* Fix the mistake replace from distribute to setuptools

* Add a testcase for this bug
(cherry picked from commit 93c5781)

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

* Add a change note
6 years ago
Matt Davis 2f8d3fcf41
split PS wrapper and payload (CVE-2018-16859) (#49143)
* 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
Felix Fontein 29e2454f7c 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.

(cherry picked from commit 9caaf7b109)
6 years ago
Martin Krizek 316d3abb42 Properly handle FieldAttribute.default if callable (#48992)
* Properly handle FieldAttribute.default if callable

Fixes #48673

* Add changelog...

* Add integration test

* Add aliases file

(cherry picked from commit 48ffd8789f)
6 years ago
Zeng Jie b7349b2ad4 Fix dictionary iteration exception reported in #48096 (#48836)
(cherry picked from commit a9c2bc955c)
6 years ago
Jordan Borean 7e32f1ffb0 [ec2_group] fix comparison of determining which rules to purge - 2.7 (#48967)
* Added changelog fragment

* Fix comparison of determining which rules to purge by ignoring descriptions (#48443)

AWS uses rule type, protocol, port range, and source as an idempotent identifier.
There can only be one rule with that unique combination. Rules that differ only by description are allowed but overwritten by AWS.
Add a test

Co-authored-by: Will Thames <will@thames.id.au>
(cherry picked from commit 54a2f21f93)
6 years ago
Abhijeet Kasurde 24eb3c5c60 [Backport 2.7] wait_for: Add note about path and port (#49118)
Document that Path and Port are mutually exclusive parameters in the wait_for module.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 70f992c618)
6 years ago
Anton Nikulin 02a8121dea [stable-2.7] FTD HTTP Api plugin bug fixes (#47747) (#48982)
* FTD modules: upsert functionality and bug fixes (#47747)

* FTD modules: bug fixes and upsert functionality

* Fix sanity checks

* Fix unit tests for Python 2.6

* Log status code for login/logout

* Use string formatting in logging

(cherry picked from commit 9770ac70f9)

* Add changelog entry
6 years ago
Jordan Borean 845776ed6a win_security_policy - add warning when using this module ot edit rights (#48850)
(cherry picked from commit 9b0dd5224b)
6 years ago
Adam Miller 64cea41f6b dnf to support modularity module appstream specs
Fixes #48743

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

fix up sanity tests and with_modules conditional

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

fix yamllint sanity

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

fix group-missing/invalid-group detection

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 41176b5e0f)
6 years ago
nervo 1cba0a753a Sysvinit - Enabling a service should use "defaults" if no runlevels are specified 6 years ago
Brian Coca 1469ec4487 better handling of bad type in config (#48821)
* better handling of bad type in config

 fixes #22468, fixes #22476


(cherry picked from commit 87e44a7ed1)
6 years ago
Brian Coca f8339bd9c0 fix bug in config mgr
- use function that creates config slots as needed

(cherry picked from commit 652da82558)
6 years ago
Maciej Delmanowski a22a283156 Add changelog fragment about 'apt_key' no TTY fix 6 years ago
John R Barker 6b3619da9e Backport/2.7/46044 Make puppet module useable on puppet 6 (#48871)
* Make puppet module useable on puppet 6 (#46044)

The unused ignorecache setting has been removed and so you
can't run puppet through this module anymore.

See PUP-8533 / https://tickets.puppetlabs.com/browse/PUP-8533
(cherry picked from commit 475d69da69)

* changelog
6 years ago
Dave Bendit 51a3d60991 [docker_network] Add handling for Python booleans in driver_options
Fixes #26708
6 years ago
René Moser de12161dea cs_template: fix KeyError on state=extracted (#48675)
* cs_template: fix KeyError on state=extracted

* add changelog

(cherry picked from commit c7c3ca1c41)
6 years ago
Toshio Kuratomi fa0af52765 New release v2.7.2 6 years ago
Felix Fontein ce9f2e6147 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.

(cherry picked from commit b1acabcd03)
6 years ago
Jiri Tyr 476673f3e4 [stable-2.7] Support .yaml extension for meta file (#46505)
(cherry picked from commit e4cadddd70)
6 years ago
Felix Fontein 28290ee1e5 [2.7] docker_container: make condition less specific (#48593)
* docker_container: make condition less specific (#48590)

* Code seems to have changed from 409 to 400, so let's not check the code.

* Unpause container before removing it.

* Improve code.

* Same for stop_container.

(cherry picked from commit f3a3f42490)

* Add changelog.
6 years ago
Mariusz Mazur 642cd53857 k8s_facts: fix handling of unknown resource types (#47857)
(cherry picked from commit a5c8e952e8)
6 years ago
Ali 84db20ea07 Updated documentation for the k8s module
(cherry picked from commit 0b15e1df9c)
6 years ago
Jose Delarosa dc21c0c0b0 Do not reboot after updating BIOS configuration
(cherry picked from commit 2b74a17996)
6 years ago
René Moser 99104c25ed vultr_server_facts: add tests and changelog for firewall group fix in #48342 (#48411)
(cherry picked from commit 9050c7abeb)
6 years ago
Dario Zanzico a08d0eab32 clarify port.mode paramter requiremets, fail if unmet (#47938)
* clarify port.mode paramter requiremets, fail if unmet

* changelog fragment

* shorten too long line

* remove unnecessary indentation

* test version on docker_version for better maintainability

* normalize imports

* changelog fragment: minor_changes -> bugfixes

* rollback e96a7e57dfefd566fa47cf465a759637affd4795

* typo

Co-Authored-By: dariko <dariko@users.noreply.github.com>

(cherry picked from commit 89bcd3ff1e)
6 years ago
Felix Fontein b126a21963 Docker volume fix labels (#48536)
* Add integration test for labels (which fails).

* Changing labels from list to dict.

* Add changelog.

(cherry picked from commit feb60b947c)
6 years ago
Abhijeet Kasurde 709845436e Update plugin filter documentation (#46665)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6d36849f72)
6 years ago
Andrea Tartaglia 50e6361c3f (Backport) ec2_instance, ebs_optimized not sub-option of network (#48467)
* ec2_instance: ebs_optimized is not sub-option of 'network' (#48341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI

(cherry picked from commit b7d9feb7dc)

* Added changlog fragment for PR #48341

* fixed yaml errors in changelog
6 years ago
Eric Matysek 483226cdce Fix consistency issue in grafana_dashboard module. (#47459)
* Move check for 'dashboard' key to before the create/update if statement.
* Add changelog fragment for PR #47459

(cherry picked from commit 880762e07e)
6 years ago
Daniel Shepherd 1abd90e3e6 Backport/2.7/47695 - pamd fixes (#48307)
* pamd: fixes for multiple issues (#47695)

* Providing fix for #47083 in pamd.py

* Providing fix for #47197

* Fixing pep8 errors

* update regex to account for leading dash and VALID_TYPES with dashes as well

* use a results dictionary and clean up unnecessary items

* remove unnessecary return value. action is already reported in invocation output

* make naming consistent across action returns

* fix comparison so it checks equality instead of identity and indentation in update_rule()

* make sure file always has EOF newline

* updated regex to skip spacing between path and args and add rule arg regex to capture complex args

* new module argument parsing code in function and DRY changes

* remove unused has_rule method on PamdService class

* fix error in parse_module_arguments()

* updated args_present action to make it handle key value args and fail on complex bracketed arguments

* pep8 and other fixes so units still work

* suggested change - make version removed 2.8

Co-Authored-By: shepdelacreme <shepdelacreme@users.noreply.github.com>

* add more error proof test to if statement

(cherry picked from commit ef690e928f)

* add changelog fragment for backport

* add action return value back for backport
6 years ago
Strahinja Kustudic f027f44ce4 [stable-2.7] Fix pip idempotence in check mode
PIP package names must be case insensitive, and must consider hyphens
and underscores to be equivalent
(https://www.python.org/dev/peps/pep-0426/#name), because of this the
module didn't work correctly in check mode. For example if the passed
package name had a different case or an underscore instead of a hyphen
(or the other way around) compared to the installed package, check mode
reported as changed, even though packages were installed. Now the module
ignores case and hyphens/underscores in package names, so check mode
works correctly.
(cherry picked from commit b89b688)

Co-authored-by: Strahinja Kustudic <kustodian@gmail.com>
6 years ago
Felix Fontein 33ccd3b78d [2.7] Fix advertise addr (#48405)
* Fix advertise addr (#47608)

* Fix issue #46326

* Update example to create a default swarm

(cherry picked from commit 87de2dde9f)

* Add changelog.
6 years ago
Christopher Gadd 264bc930ef [stable-2.7] make password locking in user module idempotent (#43671)
* Simplify logic and add FreeBSD & NetBSD

* Remove incorrect flag for lock and unlock on FreeBSD

* Add tests and changelog

Co-authored-by: Chris Gadd <gaddman@email.com>
(cherry picked from commit f75a84e382)

Co-authored-by: Christopher Gadd <gaddman@email.com>
6 years ago
Stefan Siegel 8cd7970b98 [stable-2.7] Always use /proc/sys/kernel/random/boot_id to confirm reboot on Linux (#47017)
* Always use /proc/sys/kernel/random/boot_id to confirm reboot on Linux

/proc/sys/kernel/random/boot_id is available since kernel 2.3.16 and
should be safe to rely on.

The previously used method by checking the system boot time using who -b
turned out to be unreliable: Some systems lacking an RTC report the Unix
epoch as boot time, but the code trying to detect that did't always
work.

Closes #46562

* Change DEFAULT_BOOT_TIME_COMMAND

- change to usinsg /proc by default
- add BOOT_TIME_COMMANDS for BSD, Solaris, and macOS
(cherry picked from commit ae7b9ea8cd)

Co-authored-by: Stefan Siegel <ssiegel@sdas.net>
6 years ago
Martin Krizek 9138a95402 [stable-2.7] user: fix removing the expiry time when it's 0 (#47115)
* user: fix removing the expiry time when it's 0

* Improve tests and add changelog

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
(cherry picked from commit 41dfc5162f)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
6 years ago
Adam Miller 4156d01c01 yum also parse obsolete package output (#45365)
* yum also parse obsolete package output

This is a rebase of the patch originally proposed in
https://github.com/ansible/ansible/pull/40001 by machacekondra

Fixes #39978

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

* properly parse the obsoletes, provide a new output entry, add changelog

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

* make pep8 happy

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

* remove q debugging output

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 091fb1dc3f)
6 years ago
Jose Delarosa 7f29557016 Provide flexibility when retrieving facts (#46148)
* Provide flexibility when retrieving facts

* Check if keys exist before trying to read

(cherry picked from commit 81640a2c67)
6 years ago
Konstantin Shalygin 0ee072fffc mail: fixed STARTTLS module working with python 3.7.0 (#47412)
(cherry picked from commit 8c9070ec05)
6 years ago
Deepak Agrawal 71ee1adf0b Backport/2.7/48148: net_put module leaves empty files behind (#48151)
* cleanp net_put temp file (#48148)

(cherry picked from commit d2c7665be9)

* add changelog entry
6 years ago
René Moser b000c1633d vultr: fix for API returned unexpected empty list (#48036)
* vultr: fix for API returned unexpected empty list

* add changelog

(cherry picked from commit 788247583b)
6 years ago
Jordan Borean 90fe1be33a win_uri: stop output from mixing with module result (#48140)
(cherry picked from commit 8a9d7b3695)
6 years ago
Adam Miller 3a14fe35e9 Correct yum and dnf autoremove behavior (#47902)
* Correct yum and dnf autoremove behavior

Sanity check args passed to autoremove

Fixes #47184

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

* fix docs

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 1c777976c5)
6 years ago
Sam Doran bab062d639 [stable-2.7] User module - allow bang and exclamation in password field without warning (#46498)
* Allow bang and exclamation without warning

Allow the password field to be ! or * without warning when using this feature to create accounts that are locked.

Add documentation  and tests to cover this.

* Use set() rather than braces for Python 2.6
(cherry picked from commit 066af3b6ca)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Chris Archibald 12271999e2 Backport/2.7/47621 (#48129)
* NetApp bugfix for na_ontap_snapmirror (#47621)

* Bug fixes for Snapmirror

* Bug fixes for Snapmirror

(cherry picked from commit 8f3e297d7d)

* add fragment
6 years ago
Chris Archibald 23851bc8fe Fix argument_spec for modules that are using the old version (#47693) (#48127)
* Fix argument_spec for modules that are using the old version (#47693)

* Use correct argument spec

(cherry picked from commit 0cf88809ef)

* Add fragment
6 years ago
Matt Martz 0be3307bac [stable-2.7] Fix return statement where we short circuit _get_delegated_vars (#48102)
(cherry picked from commit cb5626c)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Dag Wieers 5dfd7c181f [2.7] aci_iplpg: Support missing aep (#48115)
* aci_iplpg: Support missing aep

* Adapt integration tests to fix

* Add changelog fragment

* Fix PEP8 issue
6 years ago
Dag Wieers c78945d184 Add changelog fragment 6 years ago
Jesse Pretorius d4152e161d Add issue 47301 changelog fragment 6 years ago
Dag Wieers ac2c1a89a8 aci_switch_leaf_selector: Support empty policy_group 6 years ago
Felix Fontein b0b9b4f7dd docker_container: fix container removal when auto_remove is used (#48061)
* Fix container removal when auto_remove is used.

(cherry picked from commit af2b477950)
6 years ago
John R Barker 9ac8763df2 ldap_attr bugfix (#48009) (#48106)
* ldap_attr bugfix (#48009)

(cherry picked from commit ee13bc248b)

* changelog
6 years ago
Felix Fontein 0742f00c29 docker_container: fix paused and add some tests (#47900)
* cleanup is already tested.

* Add test for paused.

* Add recreate and restart tests.

* timeout is a common docker option

* Implement paused and fix paused test.

* Add changelog.

* Improve paused test.

(cherry picked from commit 65768b996d)
6 years ago
Artem Goncharov 953568e213 fix missing exceptions openstack modules (#48088)
* Fix missing exceptions (#45775)

* Replace non-existing OpenStackCloudTimeout exception. Fixes: #45151

* Replace OpenStackCloudURINotFound that doesn't exist in the 'exceptions' module

(cherry picked from commit eb39c461ce)

* add changelog
6 years ago
Felix Fontein fb551bf62c docker_container: simplify minimal required version per option handling (#47711)
* Store parsed docker-py / docker API versions in client.

* Began refactoring 'minimal required version' for docker_container options.

* Removing some fake defaults.

* Added changelog.

* Improve tests (check older docker versions).

* Fix comparison. The breaking point is not docker-py 2.0.0, but 1.10.0.

(Verified by testing with these versions.)

* Move docker-py/API version detection to setup_docker.

* Add YAML document starter.

* docker_network requirement for docker-py was bumped to 1.10.0 in #47492.

(cherry picked from commit 3cca4185be)
6 years ago
Felix Fontein 5153286719 docker_container: fix ipc_mode and pid_mode idempotency (#47997)
* Fix ipc_mode and pid_mode idempotency when container names are used.

* Add changelog.

* Update pid_mode documentation.

(cherry picked from commit 35809e99bc)
6 years ago
Trishna Guha c63c4273df changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Trishna Guha ff467a2bdf Add changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Felix Fontein 080aa35c5b ACME: add support for POST-as-GET if GET fails with 405. (#44988)
* Add support for POST-as-GET if GET fails with 405.

* Bumping ACME test container version to 1.4. This includes letsencrypt/pebble#162 and letsencrypt/pebble#168.

* Also use POST-as-GET for account data retrival.

This is not yet supported by any ACME server (see letsencrypt/pebble#171),
so we fall back to a regular empty update if a 'malformedRequest' error is
returned.

* Using newest ACME test container image.

Includes letsencrypt/pebble#171 and letsencrypt/pebble#172, which make Pebble behave closer to the current specs.

* Remove workaround for old Pebble version.

* Add changelog entry.

* First try POST-as-GET, then fall back to unauthenticated GET.

(cherry picked from commit 92d9569bc9)
6 years ago
Abhijeet Kasurde 949ffe6da7 VMware: Handle exception for no snapshot while cloning (#47924)
Handle exception when there is no snapshot available in virtual machine or template while cloning using vmware_guest.

Fixes: #47920

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 487f2f25ce)
6 years ago
Abhijeet Kasurde 2f55215db2 VMware: improve readability and fix privileges names on scenario_clone_template (#47960)
(cherry picked from commit 89f03314ce)
6 years ago
Brian Coca 71ad7da2f8 remove redundant md5 hashing
(cherry picked from commit d590f10d32)
6 years ago
Abhijeet Kasurde c18eb52ade VMware: Fix documentation for cloning template (#47847)
Fixes: #46700

(cherry picked from commit ab0d90f882)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Jacob e6ed883ffd [backport 2.7] Fixes HTTP redirect issue (#45513) (#47822)
* Fixes HTTP redirect issue (#45513)

(cherry picked from commit e701b5a412)

* add changelog fragment
6 years ago
Michał Siemek 951572bec1 [backport 2.7] Check if `enabled_snat` is set in modules arguments (#46754) (#47807)
* Check if `enabled_snat` is set in modules arguments (#46754)

If `enabled_snat` is not set at all in module arguments but Neutron
policy sets it by default in Openstack, then `os_router` will attempt to
recreate otherwise perfectly good router.

Follow up for https://github.com/ansible/ansible/issues/44432#issuecomment-428531031

(cherry picked from commit c2b7174d31)

* Add changelog entry
6 years ago
Jacob 01c0a6d699 [backport 2.7] Fix idempotency issues in set_bios_attributes (#47802)
* Fix idempotency issues in set_bios_attributes

- Added check to see if attribute even exists, if not, it exits.
- Then checks if attribute is already set to value we want to update
  it to. If yes, then it exits and changed=False
- Otherwise updates the attribute and changed=True

(cherry picked from commit 1c37471274)

* add changelog fragment
6 years ago
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