Commit Graph

715 Commits (stable-2.7)

Author SHA1 Message Date
Jordan Borean c8914a1678 windows - Fix module utils with glob paths (#53835)
* windows - Fix module utils with glob paths

* fix link util tests when using DOS 8.3 paths

(cherry picked from commit 980ca564ce)
6 years ago
Jordan Borean 19385f1ee1 win_slurp - fix glob like paths (#53831)
(cherry picked from commit d00418c924)
6 years ago
Jordan Borean edfc44ec51 win_owner - fix glob like paths (#53830)
* win_owner - fix glob like paths

* Fix issues on older PS versions

(cherry picked from commit d063cefb64)
6 years ago
Jordan Borean f9e6a89993 win_acl_inheritance - fix glob like paths (#53829)
(cherry picked from commit 3cfa71bff0)
6 years ago
Jordan Borean 73bf34ed41 win_acl - fix glob file paths (#53828)
(cherry picked from commit aba6f5f50d)
6 years ago
Jordan Borean b0c6499b60 win_tempfile - return absolute path on created temp file (#53827)
* win_tempfile - return absolute path on created temp file

* Fix tests for CI

(cherry picked from commit 4f9de45785)

8
6 years ago
Sam Doran 833b29b39c [stable-2.7] Correctly count processors on ARM systems. (#52884) (#53798)
* [stable-2.7] Correctly count processors on ARM systems. (#52884)

- Add unit tests for Linux CPU info
- Add cpuinfo output from several systems for unit tests

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 55306906cf)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Add changelog
6 years ago
Jordan Borean 4840952f3d win_reboot - Fix rc validation when using psrp and add extra docs - 2.7 (#53718)
* win_reboot - Fix rc validation when using psrp and add extra docs (#53711)

* win_reboot - Fix rc validation when using psrp and add extra docs

* Revert boot time command and fix docs

(cherry picked from commit 3d23e47c53)

* win_reboot - fix broken tests after recent commit (#53722)


(cherry picked from commit d9795bad98)
6 years ago
Matt Martz 166ef9f668 [stable-2.7] Fix checksum file parsing in get_url (#53685) (#53694)
* [stable-2.7] Fix checksum file parsing in get_url (#53685)

* Fix checksum file parsing. Fixes #48790

* guard invalid int conversion

Co-Authored-By: sivel <matt@sivel.net>

* Remove extra newline.
(cherry picked from commit 77217fdd24)

Co-authored-by: Matt Martz <matt@sivel.net>

* Remove use of undefined variable
6 years ago
Martin Krizek 81d893d6ee 2.7: yum: fix disable_excludes in repoquery fallback (#53697)
* yum: fix disable_excludes in repoquery fallback (#53552)

Fixes #53134

(cherry picked from commit 42731ec73f)

* Add changelog for #53552 (#53695)


(cherry picked from commit e0a7f01f0b)
6 years ago
Matt Martz abf5f7583e [stable-2.7] Don't raise AnsibleConnectionFailure if the ssh process has already died. (#53534)
* Don't raise AnsibleConnectionFailure if the ssh_process has already died. Fixes #53487

* Better support for file not found messages

* Add changelog fragment
(cherry picked from commit e9f9bca)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Jordan Borean 0a03d0ee0e win_chocolatey - Fix incompatibilities with latest Chocolatey release (#53841)
(cherry picked from commit cac3c6efcf)
6 years ago
Toshio Kuratomi b4cba61b67 New release v2.7.9 6 years ago
Matt Clay 15c5d85251 [stable-2.7] Keep existing to_yaml behavior with pyyaml >= 5.1. (#53772)
In pyyaml versions before 5.1 the default_flow_style for yaml.dump
was None. Starting with 5.1 it is now False. This change explicitly
sets the value to None to maintain the original to_yaml behavior.

The change to pyyaml was made in the following commit:

507a464ce6
(cherry picked from commit 7f0e09aa31)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Ryan Conway bd15658f2c Backport/2.7/51953 (#53657)
* Backporting the logical changes from #51953 to restore functionality on the newer 1Password CLIs v0.5.5+.

* Adding changelog fragment for this backport PR.
6 years ago
Felix Fontein ca63a2a968 docker_container: show warnings, fix/improve tests (#53440)
* Output warnings from docker daemon on container create and update.

* Accept warning for blkio_weight instead of idempotency.

* Value quoting.

* Avoid loop variable conflict.

* Add changelog.

* Make one test case faster.

* Add 'Docker warning: ' prefix.

* Add a generalized warning reporting function.

(cherry picked from commit 3117900b1e)
6 years ago
Sloane Hertel 5769d46aa3 use composed vars in constructed groups (#53152)
* changelog

* combine provided variables and host vars inside of constructing groups to take into account composed variables

let composed variables "win"

* fix whitespace

* Allow user to control hash behavior

(cherry picked from commit 4172d68dc3)
6 years ago
Felix Fontein 2773e215f7 [2.7] docker_swarm: removing nodes requires docker >= 2.4.0 (#53592)
* Removing a swarm node does not work with docker-py < 2.4.0, since it calls client.inspect_node(). (#53565)

For the same reason, docker_node requires docker >= 2.4.0.

(cherry picked from commit c75da35595)

* Reconstructing a change from devel which is required to make usage detection work this way.
6 years ago
Jason Witkowski b84d9a8365 apply node_id parameter to swarm node removal (#53503)
(cherry picked from commit be39e757e3)
6 years ago
Matt Martz 07e4ae0806 [stable-2.7] Allow dict2items to work with hostvars (#53538).
(cherry picked from commit 414440e323)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Brian Coca c93bfe9931 allow nontype configdata (#53365)
(cherry picked from commit 90bcff3d92)
6 years ago
Jakob Ackermann 3944f51677 [docker_image] fix the changed state for tagging and pushing (#53451)
* [docker_image] fix the changed state for tagging and pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add tests for (force) tagging and force pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add a news fragment for the fixed force tag/push behavior

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
(cherry picked from commit 13ab9a61a8)
6 years ago
Timo Runge a32e8c42b9 Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#53445)
* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#1)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191)

* Adding changelog fragment for issue #49191 and the following PR.

* Update lib/ansible/module_utils/mysql.py

Co-Authored-By: timorunge <timorunge@users.noreply.github.com>
(cherry picked from commit b45b599433)
6 years ago
Timo Runge 7e83675227 module_utils/mysql: Fixing unexpected keyword argument 'cursorclass' error after migratio… (#47809)
* Fixing unexpected keyword argument 'cursorclass' error after migration from MySQLdb to PyMySQL

* Adoptions for mysql.py as suggested by felixfontein.

* Adding changelog fragment.

(cherry picked from commit 47190088b4)
6 years ago
S edd7e53b8b Fixed win_file crash with hidden files (#52584)
* Fixed crash with hidden files

added "-force" parameter on "Get-Item" cmdlet. this is needed to get file info if the file is "hidden" 
without this option modules like win_file, win_template, win_copy crashes on hidden files. this is because with "test-path" it sees that the file exists, but "get-item" can't get the file info. 
for more information on "-force option": https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-item

* Add changelog and integration tests

* fix tests for older Windows versions

(cherry picked from commit 3bc474bf99)
6 years ago
Jordan Borean e0294275d7 win_domain: fix issue when running without credential delegation (#53480)
* win_domain: fix issue when running without credential delegation

* Add check for reboot is required to complete role e install

* Fix changelog sanity issue

* removed meta file accidentally committed

(cherry picked from commit 008db85d44)
6 years ago
Felix Fontein c4748fd011 openssl_csr: improve subject validation (#53198)
* Improve subject field validation.

* Add country name idempotency test.

* Add failed country name test.

* Add changelog.

(cherry picked from commit b2e992cecd)
6 years ago
Felix Fontein 3380defd67 [2.7] docker_swarm_service: rename return variable to swarm_service (#53408)
* docker_swarm_service: rename return variable to swarm_service (#53229)

* Rename return variable to swarm_service.

* Add changelog.

* Add that old name will stay in Ansible 2.7.x.

(cherry picked from commit 61abbfc269)

* Keep old variable for backwards compatibility.
6 years ago
Felix Fontein 3eccd83891 openssl_csr: improve invalid SAN error messages (#53201)
* Improve invalid SAN error messages.

* Add changelog.

(cherry picked from commit 628326b879)
6 years ago
Felix Fontein 94b5a03b0e openssl_certificate: make sure extensions are present when they are queried by assertonly (#53207)
* Make sure extensions are present when they are queried by assertonly provider.

* Add changelog.

(cherry picked from commit 6249bb8ea4)
6 years ago
Jordan Borean 8bb830c1b4 win_chocolatey_source - fix state=disabled with no source (#53097)
(cherry picked from commit be7768efc7)
6 years ago
Jordan Borean bfe072c9dc winrm - try and recover from a send input failure (#53187)
(cherry picked from commit ae24bbff4a)
6 years ago
Felix Fontein ed12e93f73 [stable-2.7] Python 2: accept both long and int for type=int (module options) (#53289)
* Added unit test.
(cherry picked from commit 07fcb60d55)

Co-authored-by: Felix Fontein <felix@fontein.de>
6 years ago
Felix Fontein 2f91d399ec [2.7] docker_swarm_service: don't crash when publish isn't specified (#53262)
* Don't crash when publish isn't specified.

* Add changelog.

* Add validation code.

* Use generic supertype of dict.
6 years ago
Brian Coca 03ceec9c78 properly convert inputs to handle bytes/unicode (#53072) (#53124)
* properly convert inputs to handle bytes/unicode (#53072)

* properly convert inputs to handle bytes/unicode

  fixes #52186

* Update changelogs/fragments/nmap_bytes_fix.yml

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>
(cherry picked from commit 55dc63be3a)

* updated as per fb

* spacer
6 years ago
Felix Fontein 5aabb5ea02 docker_swarm: support older docker-py versions (#53129)
* Decreasing docker_swarm requirements.

* Fixing docker-py / docker API version requirements, and some comments.

* Add changelog.

* Only send parameters specified by user to docker daemon.

* Extend labels test: not specifying == keep labels.

* Bump minimally required docker-py version for docker_node and docker_node_facts to 2.4.0.

* Prevent crashing when publish or healthcheck is not provided.

* Similarly to docker_swarm tests, only execute docker_node tests on real VMs and restart docker daemon when tests are done.

(cherry picked from commit 8e26c2dfbe)
6 years ago
Felix Fontein 122e73d062 [2.7] docker_swarm_service: fix problem with UpdateConfig on certain docker daemons (#53224)
* Avoid KeyError when UpdateConfig isn't returned.

* Add changelog.
6 years ago
Felix Fontein 597db1dc28 [2.7] openssl_certificate, fixed has_expired to check the cert expiration date (#53203)
* Type error in openssl_certificate (#47508)

* Fixed #47505: Type error in openssl_certificate
* Use to_bytes instead of str.encode in SelfSignedCertificate. Updates #47508
* Use to_bytes instead of str.encode in OwnCACertificate
* Added integration tests for openssl_certificate: selfsigned_not_before/after and ownca_not_before/after

(cherry picked from commit 5b1c68579d)

* openssl_certificate, fixed has_expired to check the cert expiration date (#53168)

(cherry picked from commit d5d92e4a70)

* Use fixed timestamp in past instead of relative time (relative times are a feature of devel).

* Add changelog for #47508.
6 years ago
s-hertel bded9a1d65 If the private_ip has been provided for the new network interface it shouldn't also be added to top level parameters for run_instances
changelog

(cherry picked from commit d16ec175fc)
6 years ago
Tuan Anh Hoang-Vu 0b453abfa4 [backport 2.7] Fixed lvol ValueError with float size. (#52836)
* Fixed lvol ValueError with float size.

(cherry picked from commit 85bd54dfa7)

* Fixed lvol ValueError with float size.

(cherry picked from commit ecdd835b6c)

* Initialized locale using system default.
Changed size validation from float() to locale.atof().

(cherry picked from commit d187b95929)

* Added changelog fragment.

(cherry picked from commit d1f6b1220c)

* Used C locale instead of relying on system locale.

(cherry picked from commit 90b3d96869)
6 years ago
Sam Doran d44f80cb92 [stable-2.7] Modify the correct variable when setting available hashing algorithms (#52994)
* Revert "use list instead of tuple and remove md5 on ValueError (#51357)" c459f040da.
* Modify the correct variable when determining available hashing algorithms.
(cherry picked from commit 23a6b88dd2)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Tony Finch 9c7d36ccb5 get_url: return no change in check mode when checksum matches
Signed-off-by: Tony Finch <dot@dotat.at>
6 years ago
Pablo Piaggio 5d4a777d16 Backport/2.7/51853 (#53153)
* Add support for macro contexts that have colons (#51853)

Currently when used with macro contexts that have a colon inside, 
macro_name gets truncated. A common case is contexts that represent a 
Windows drive. Examples:

  - 'C_DRIVE_THRESHOLD: "C:"'
  - 'C_DRIVE_THRESHOLD: "D:"'

This happens because line 189 assumes there are only one colon in 
macro_name, and thus two substrings to join.

To solve this, it is necessary considering that macro_name could have 
more that one colon. After the split, the first element is the proper 
Zabbix macro name. Then, the solution is joining all the remaining 
substrings after that.

This is backwards compatible in the case macro_name have only one colon.

(cherry picked from commit d1d4f4bd27)

* Add support for macro contexts that have colons

Currently when used with macro contexts that have a colon inside,
macro_name gets truncated. A common case is contexts that represent a
Windows drive. Examples:

  - 'C_DRIVE_THRESHOLD: "C:"'
  - 'C_DRIVE_THRESHOLD: "D:"'

This happens because line 189 assumes there are only one colon in
macro_name, and thus two substrings to join.

To solve this, it is necessary considering that macro_name could have
more that one colon. After the split, the first element is the proper
Zabbix macro name. Then, the solution is joining all the remaining
substrings after that.

This is backwards compatible in the case macro_name have only one colon.
6 years ago
Felix Fontein 05f7fbc93a docker_swarm: fix ca_force_rotate idempotency (#53039)
* Fix ca_force_rotate idempotency.

* Add changelog.

(cherry picked from commit dec97381bc)
6 years ago
Felix Fontein c4144398bb Fix force when state==present. (#53003)
(cherry picked from commit 76e0e0080b)
6 years ago
Felix Fontein 2ee64fd507 docker_swarm: fix idempotency (#52976)
* Improve idempotency checking: only consider parameters which are part of the generated spec.

* Properly handle rotate_worker_token and rotate_manager_token.

(cherry picked from commit 42ae6cdb95)
6 years ago
Felix Fontein aed59e5695 docker_swarm: make labels work with older docker daemon versions (#52895)
* Make labels work with older docker daemon versions.

* Fix idempotence detection.

* Add changelog.

(cherry picked from commit a1ec307d43)
6 years ago
Felix Fontein 23d9efc1f3 docker_swarm: hopefully fix debug CI problems, and fix check mode (#52825)
* Let's see some debug output.

* Also check LocalNodeState.

* Improve tests.

* Actually implement check mode.

* Add changelog.

* Add pretty-printing and more output.

(cherry picked from commit 81d58cfef6)
6 years ago
Brian Coca 6bd7ef4838 Ensure play order is obeyed (#49897)
* Ensure play order is obeyed

 it was being ignored depending on other options
 also added tests for each order (except shuffle) both serial and not
 fixes #49846


(cherry picked from commit cfba6dfe91)
6 years ago
Mario Lenz 2aa96cdec5 [Backport 2.7] VMware: Fix KeyError in vmware_host_config_manager 6 years ago
s-hertel 88106ce626 fix no_log indentation so AWS temporary credentials aren't displayed in tests
(cherry picked from commit 6cacbcba66)
6 years ago
Abhijeet Kasurde 096b3f8eb9 [Backport 2.7] VMware: Handle customValue in inventory
* VMware: Refactor guest inventory plugin

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e41b98ffb5)
6 years ago
René Moser 8de92123f3 [2.7] cloudscale: fix compatibilty with older py3 versions (#52822) (#52915)
* cloudscale: fix compatibilty with older py3 versions (#52822)

* cloudscale: fix compatibilty with older py3 versions

* add doc fragment

(cherry picked from commit ee416fd01d)

* cloudscale: improve error handling (#53054)


(cherry picked from commit ca91ac2ca0)
6 years ago
Brian Coca a79523acff Loader invalid plugin nicer error (#52754)
* stop processing invalid plugins

(cherry picked from commit 514b974182)
6 years ago
Jordan Borean 441e4ff99f win_certificate_store - Fix exception handling typo (#52906)
(cherry picked from commit 1126f76d4d)
6 years ago
Dag Wieers 6ac135e8b3 [Backport 2.7] Add missing ConnectionError imports
Small fix

(cherry picked from commit 51c5e60e49)
6 years ago
rockandska affba46115 Fix idempotence in rabbitmq_plugin (#52166)
* Fix idempotence in rabbitmq_plugin

* Add changelog fragment

(cherry picked from commit 540b07b884)
6 years ago
arsenicks 8fba0ab199 Backport into 2.7
Katello: Added product to the dict choices (#49776)

* Added product to the dict choices.

Following issue 48594 where product is not a recognised choice: https://github.com/ansible/ansible/issues/48594

* fixed doc

added - product to the doc

* split line 549

to correct ci test splitting line 549

* Create 49776-product_fix_katello_foreman_module.yaml

changelog fragment creation

(cherry picked from commit d3fcdae4ad)
6 years ago
Till Maas 6cef018b71 rhsm_repository: Properly handle no repos (#51938)
When no repos are defined, the `repo` variable is undefined. Therefore
append it only to the result if a repo was found. Otherwise Ansible will
fail with an UnboundLocalError.

(cherry picked from commit 0469134f16)
6 years ago
Aniket Khisti 2d4096daf0 Fix trackback on providing arguemnt --all to ansible-doc command (#52034)
* Remove redundant argument from the function caller
* Add unit test
* Add changelog
6 years ago
Albert Cervera i Areny e7cf6b7513 Filter DNSimple request by record name. (#49981)
* Filter DNSimple request by record name.

The request was not filtered and DNSimple returns only the first 100
records so if the number of records is larger the check could fail.

This patch fixes the issue and also makes the check to perform better.

* Add changelog fragment.

(cherry picked from commit e0274adafe)
6 years ago
Jiri Tyr b8e8e2baa0 Fixing state=present for jenkins_plugin module (#52051) (#52535)
* Fixing state=present for jenkins_plugin module (#52051)


(cherry picked from commit 5f4840aaa8)

* Adding changelog fragment for PR #52051 (#52687)


(cherry picked from commit ee14b123f3)
6 years ago
Jiri Tyr 573a1106cd Updating update_url for jenkins_plugin (#52086) (#52536)
* Updating update_url for jenkins_plugin (#52086)


(cherry picked from commit f49469f7bf)

* Adding changelog fragment for PR #52086 (#52689)


(cherry picked from commit 280e8911ce)
6 years ago
Alan Rominger ac4447f2c4 Plugin errors backport (#52749)
* Fix missing tracebacks in ansible-inventory

(cherry picked from commit b62693299b)

* remove usless tb initiator

  always pass proper tb
6 years ago
Zim Kalinowski f80e9070a5 Backport/2.7/52540 (#52545)
* fixed deallocated vm facts problem (#52540)

(cherry picked from commit d6600b0ab6)

* added changelog
6 years ago
Philippe Makowski ec8c1cb34a fix bug #47154 (#49881)
(cherry picked from commit 61743ab39a)

backport bugfix for urpmi module

add changelog
6 years ago
René Moser 24318d51e5 [2.7]: dnsimple: fix KeyError: 'record_type' (#52646)
* v2 dnsimple api uses type vs record_type (#39301)

* v2 dnsimple api uses type vs record_type

https://developer.dnsimple.com/v2/zones/records/#listZoneRecords

* replace prio with priority

(cherry picked from commit bb6a82d2a9)

* add changelog
6 years ago
Jordan Borean a998c267c2 win_chocolatey - fix beta version parsing (#52601)
(cherry picked from commit 1ec376abca)
6 years ago
plumbeo bf7597efe1 backport/2.7/40092 (#51909)
* mysql_user: Match quotes, double quotes and backticks when checking current privileges

(cherry picked from commit 1ae0e21383)

* Add changelog fragment for PR #40092

(cherry picked from commit 8974ce3c78)

* mysql_user: fix malformed regex used to check current privileges
6 years ago
Toshio Kuratomi cf6c765871 New release v2.7.8 6 years ago
Zim Kalinowski cb844ae32b Backport/2.7/45269 (#52466)
* Fixing issues with azure_rm_virtualmachine crashing (#45269)

* vm fixes

(cherry picked from commit f04139bfa3)

* added changelog
6 years ago
Zim Kalinowski 211fe600a4 fixing force_update in azure_rm_mysqldatabase (#52389)
(cherry picked from commit fa73abcf5d)
6 years ago
Zim Kalinowski 474d76c0dd Fixing azure_rm_postgresqldatabase force_update parameter (#52388)
(cherry picked from commit 8422e23533)
6 years ago
Zim Kalinowski 40055b4507 Fixing managed disk facts (#51781)
(cherry picked from commit 0c8c72a0bf)
6 years ago
Zim Kalinowski 0e4f07b5ae resolved conflict 6 years ago
Zim Kalinowski 0fed03fa85 merge conflict 6 years ago
Zim Kalinowski f85cd0b0c2 Backport/2.7/49704 (#52467)
* backport image crash fix

* adding changelog fragment
6 years ago
Zim Kalinowski 3929cfea85 merged change 6 years ago
Zim Kalinowski e531356d07 Backport/2.7/50120 (#52444)
* fixed crash in facts (#50120)

(cherry picked from commit 756ad176cc)

* added changelog
6 years ago
Alan Rominger b159fc38ce Send openstack inventory logs to stderr (#51827) 6 years ago
Martin Krizek 7fb1549152 Native Jinja2: raise undefined error immediately (#52237)
Fixes #52158

(cherry picked from commit 50d7483632)
6 years ago
T. Ichikawa dc3b7aebd6 Backport/2.7/51548 - Properly handle unauthenticated yum proxy config (#52245)
* Properly handle unauthenticated yum proxy config (#51915)

Fixes #51548

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

* Fix: Yum module does not use proxy when username is not set #51548 (#51994)

* add test of yum with proxy

* Properly handle unauthenticated yum proxy config

Fixes #51548

* shell executable is bash

(cherry picked from commit c2a409a9e0)
6 years ago
Simon Westphahl b97caade8a Backport: Raise AnsibleConnectionError on winrm connnection errors (#52227)
* Raise AnsibleConnectionError on winrm con errors

Currently all uncaught exceptions of the requests library that is used
in winrm will lead to an "Unexpected failure during module execution".

Instead of letting all exceptions bubble up we catch the connection
related errors (inkl. timeouts) and re-raise them as
AnsibleConnectionError so Ansible will mark the host as unreachable and
exit with the correct return code.

This is especially important for Zuul (https://zuul-ci.org) to
distinguish between failures and connection/host related errors.

* Update lib/ansible/plugins/connection/winrm.py

Co-Authored-By: westphahl <westphahl@gmail.com>

* Add changelog fragment
6 years ago
Wojciech Sciesinski b7b4182bbd Install the NuGet package provider if needed (#52129)
* Install the NuGet package provider if needed

* Add the changelog fragment file
6 years ago
Matt Martz 396a2f7471 [stable-2.7] Disallow use of remote home directories containing .. in their path (CVE-2019-3828) (#52133) (#52173)
* Disallow use of remote home directories containing .. in their path

* Add CVE to changelog
(cherry picked from commit b34d141)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Bill Dodd 7918323832 Backport/2.7/51764 (#52126)
* Update GetBiosBootOrder to use standard spec resources (#51764)

* update GetBiosBootOrder to use standard spec resources

* handle case where BootOrder is present but BootOptions is missing

(cherry picked from commit e0538610bf)

* add changelog fragment and fix merge issue
6 years ago
Felix Fontein 6438ab2c46 ufw: check values for direction depending on situation (#50402)
* Check values of 'direction'.

* Add changelog.

* Update lib/ansible/modules/system/ufw.py

Co-Authored-By: felixfontein <felix@fontein.de>

* Update lib/ansible/modules/system/ufw.py

(cherry picked from commit 4d3d8dd60f)
6 years ago
Jordan Borean cc5088c9e1 win become - fix token elevation issues
This is an implementation of 8bffcf8e50
that was done in the PR https://github.com/ansible/ansible/pull/48082 to devel.
The changes have been manually brought across to the the stable-2.7 branch as it
cannot be cleanly cherry picked due to the substantial differences in become
between these versions.

Currently we impersonate the `SYSTEM` token in order to elevate our become
process with the highest privileges it has available but there are some edge
cases where the first `SYSTEM` token we come across doesn't have the
`SeTcbPrivilege` which is required for the above. This PR adds a further check
in the search for a `SYSTEM` token to make sure it has the `SeTcbPrivilege`
before continuing.
6 years ago
Bill Dodd 7f33c7def5 Backport/2.7/51028 (#52048)
* get standard properties for each firmware entry (#51028)


(cherry picked from commit 63f7536594)

* add changelog fragment
6 years ago
Felix Fontein c3271befda Prevent bug in 'ufw --dry-run reset' to delete firewall rules. 6 years ago
Felix Fontein 0093b69935 openssl_csr: ignore empty strings in altnames (#51473)
* Ignore empty strings in altnames.

* Add changelog.

* Add idempotence check without SAN.

* Fix bug in cryptography backend.

(cherry picked from commit 9b1cbcf3a4)
6 years ago
Viktor Utkin e7e47ca1fc [Backport 2.7] spot instance request stay opened when module exit with timeout
Fixes: #51534

* set valid_until equal to current time + spot_wait_timeout
* add setting ValidUntil to  value
* add changelog fragment
* fix shebang issue

(cherry picked from commit d40f0313e2)
6 years ago
Nathaniel Case df359e036c [stable-2.7] ios retry config if section filter fails (#49485) (#51871)
* [stable-2.7] ios retry config if section filter fails (#49485)

* Attempt to work around devices that don't understand | section

* Fix case of no flags
(cherry picked from commit 6caed0c)

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

* Add changelog
6 years ago
fboux0 aa73f8ea3c Backport/2.7/46478 - haproxy - fixes naming collision (#51822)
* fix drain mode 'bool' (#30833) (#46478)


(cherry picked from commit 4376417743)

* Create 46478-haproxy-fix-drain-mode.yaml
6 years ago
Martin Krizek 1492f46d78 yum: disableexcludes is supported on centos6 (#51698)
(cherry picked from commit 33b07f322c)
6 years ago
Felix Fontein a200cfb07f acme_challenge_cert_helper: fix bad module.fail_json() call (#51795)
* Fix bad module.fail_json() call.

* Add changelog.

(cherry picked from commit c9b08db979)
6 years ago
Jordan Borean 718e011168 psrp - do not display bootstrap wrapper for eachach task (#51779)
(cherry picked from commit 146a89b612)
6 years ago
Elijah DeLee fe79534415 Backport aws ec2 missing region discovery (#51626)
* aws_ec2 Implement the missing 'region discovery' (#51333)

* aws_ec2 Implement the missing 'region discovery'

  fixes #45288

  tries to use api as documented (which seems to fail in latest boto3 versions)
  and fallback to boto3 'hardcoded' list of regions

* fixes and cleanup, add error for worst case scenario

* fix tests, remove more unused code

* add load_name

* acually load the plugin

* set plugin as required

* reverted test changes, removed options tests

* fixes as per feedback and cleanup

* Allow default regions list to use flexible credential types
6 years ago
Toshio Kuratomi 11a2bafa21 New release v2.7.7 6 years ago
Brian Coca 7589d496fc remove default from delegate_facts to inherit (#45492) (#51553)
* remove default from delegate_facts to inherit (#45492)

* remove default from delegate_facts to inherit

fixes #45456

* test delegate_facts

* added note about inheritance and defaults

* yamllint

(cherry picked from commit 8743e6ae2e)

* added changelog
6 years ago
Andrea Tartaglia d064534df6 Added description to single net interface (#51602)
* Added description to single net interface

* ec2_instance single iface description changelog

(cherry picked from commit b8790abcbe)
6 years ago
Sumit Jaiswal 483aa64216 Fixes issue where uppercase named A_Record delete was getting skipped (#51592)
* Fixes issue where uppercase named A_Record delete was getting skipped (#51539)

* fixes 51193

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fixes 51193

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fixes 51193

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 15cef845ca)

* shippable fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
6 years ago
chronidev 22c4745b96 Add coherency between check and normal mode for copy plugin action see issue #24633 (#51582)
* Add coherency between check and normal mode see issue #24633

* Add changelog fragment for the PR

* Make change following PR comment

* Remove trailing whitespace

(cherry picked from commit 240d1a6afb)
6 years ago
Jordan Borean 9168e6844a win_power_plan: fix for Windows 10 and Server 2008 compatibility (#51471)
(cherry picked from commit f27078df52)
6 years ago
Fabian von Feilitzsch ce033c6762 [k8s] Always check envvars when auth parameter is not provided (#51495)
* Always check envvars when auth parameter is not provided

This will make it so that all code using the get_api_client
method will make use of the environment variables, instead of
silently ignoring them if default values haven't been set. This
affects at least the k8s lookup plugin.

* Add changelog

(cherry picked from commit 0be66113d4)
6 years ago
Brian Coca 3bf030ddcc Handle complex quoting in extra args in pull cli (#50212)
* added proper testing

fixes #40729

(cherry picked from commit b6824669df)
(cherry picked from commit e010034151)
6 years ago
Ganesh Nalawade 97a3e4acc0 Allow check_mode with supports_generate_diff capability in cli_config (#51384)
* If network cliconf support `supports_generate_diff` in
  that case diff between running and cnadidate config
  is generated within Ansible and if check_mode is enabled
  in that case return only diff without actually invoking
  edit_config()

(cherry picked from commit 8f5cd049d6)
6 years ago
Dag Wieers 0d5f083a52 aci_aaa_user: Fix changing user description
This fixes a reported problem with the aci_aaa_user module.
6 years ago
Felix Fontein 51cd9c991b [2.7] docker_swarm_service: Fix endpoint mode idempotency (#51370)
* docker_swarm_service: Fix endpoint mode idempotency (#51232)

* Fix endpoint mode idempotency

* Remove newline

(cherry picked from commit ee39853426)

* Add changelog.
6 years ago
Matt Davis f759b5463b Backport #47219 fixes Python 3.7 bugs
* Resolve invalid-unary-operand-type.

* Resolve stop-iteration-return.

(cherry-picked from c24c19594e)
6 years ago
Sam Doran 44d7c1e23e [stable-2.7] Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776)
* Catch SSH authentication errors and don't retry multiple times to prevent account lock out

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Subclass AnsibleAuthenticationFailure from AnsibleConnectionFailure

Use comparison rather than range() because it's much more efficient.

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Make paramiko_ssh connection plugin behave the same way

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add changelog

Signed-off-by: Sam Doran <sdoran@redhat.com>.
(cherry picked from commit 9d4c0dc111)

Co-authored-by: Sam Doran <sdoran@redhat.com>
Signed-off-by: Sam Doran <sdoran@redhat.com>
6 years ago
Trishna Guha bb28719541 fix ansible_connect_timeout variable in connection plugins and nxos_install_os timeout check (#51209)
* fix ansible_connect_timeout variable in connection plugins and nxos_install_os timeout check (#50965)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a1ea7e430a)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Jordan Borean 44474bf424 file - allow touch on files not owned by user (#50964)
* file - allow touch on files not owned by user

* use Sentinal value and preserved existing args

* Do no instantiate the Sentinel object

(cherry picked from commit 419727a6da)
6 years ago
Nathaniel Case e828d54675 Redo #50208 on a per-plugin basis 6 years ago
John Nelson e44468738f win_chocolatey: Fix hang on missing/required base env vars (#51154)
* win_chocolatey: Fix crash on missing/required base env vars

* Add changelog fragment

(cherry picked from commit 5540d66747)
6 years ago
aaronk1 b2fbd7fd35 [backport/2.7] Update vmware.py minor typo
"supported added" changed to "support added"

(cherry picked from commit 0d97629e4d)
6 years ago
Jacob Olsen 8f2e6abbcf check for chroot in systemd module (#43904)
* check for result['status'] in systemd module

* instead of checking for result['state'], actually check for chroot and warn

* allow systemctl status to work if in a chroot, update warn text

* simply change warning message


(cherry picked from commit 37960ccc87)
6 years ago
Jordan Borean 970669b70e reboot - Fix connection timeout reset (#51000)
* only reset if we could retrieve the conn timeout

(cherry picked from commit 9fa46e7f94)
6 years ago
Brian Coca 4a89749dd5 Prevent duplicate role insertion into roles: (#50552)
* Corner case in which import_role would add another instance of a role with the same signature into roles: when it already existed there.

  roles:
	- name: a
  tasks:
       - import_role: name=a

  would execute role 'a' 3 times instead of the intended 2 (x2 in roles: phase +1 in tasks:)

* added tests

(cherry picked from commit eca7c3c8c7)
6 years ago
Ryan Conway 41214d4426 Merge pull request #50160 from Rylon/backport/2.7/47213
Fix an issue retrieving some types of 1Password items. (#47213)
6 years ago
Brian Coca 016bc83b58 ensure we have required systemd env var (#50607)
* ensure we have required systemd env var
* add clarification about systemd and user scope

  fixes #50272


(cherry picked from commit a7e81ba500)
6 years ago
Yunge Zhu 9c19df3fd2 fix new inventory azure_rm.py (#50006)
* fix new inventory

* fix lint

* resolve comments

* resolve comments

* add defensive code

* fix response not match handler

* remove useless import

* fix lint

* add changelog

(cherry picked from commit 0f846f39ca)
6 years ago
feranwq f2d4187761 archive: Fix check if archive is created in path to be removed (#29420) (#49444)
* archive: Fix check if archive is created in path to be removed (#29420)

(cherry picked from commit 3a45de4209)

* add changelog
6 years ago
Toshio Kuratomi 1594ccf533 New release v2.7.6 6 years ago
Felix Fontein 8cc23c0802 [2.7] [docker_container] Failing on non-string env values (#50899)
* [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

(cherry picked from commit d62d7176b0)

* Turn fail into warning for 2.7 backport.

* Fix test for backport

The behaviour in the backport is to warn rather than error
6 years ago
Hannes Ljungberg 2730e43e7b docker_swarm_service: Documentation fixes (#50861)
* Describe labels and container_labels correctly

* Clarify reserve_memory and limit_memory docs

* Remove default from container_labels doc

* Remove trailing whitespace

* Document min api version for configs and secrets

* Add changelog fragment

* Specify type on labels and container_labels

* Consolidate required API version descriptions

* Update reserve and limit memory docs

* Use correct power-of-two units

* Remove description about limit_memory minimum 4mb

(cherry picked from commit 644057e9ec)
6 years ago
Dhanuka 361f34b4fe redfish_utils: fix reference to local variable 'systems_service' (#50298)
* fixes issue 50296

* fixes the indentation of the return statement

* Adds a conditional test into `_find_systems_resource()` to check the existence
of the Members of System resource

* updates the error message

* harden the conditional test

* Add a changelog

(cherry picked from commit 94a1d86d70)
6 years ago
Hannes Ljungberg 40cec0e4f4 docker_swarm_service: Don’t add difference when update_order is None (#50655)
* Don’t add difference when update_order is None

* Add changelog fragment

(cherry picked from commit cde292cc43)
6 years ago
Rich Wareham 776dadc5a3 docker_swarm_service: use exact name match when finding services (#50665)
* docker_swarm_service: use exact name match when finding services

The Docker API's filtering support allows filtering for substring
matches which means that when we filter the list of running services we
may accidentally match a service called "foobar" when looking for a
service named "foo".

Fix this by filtering the list of services returned from the Docker API
so that name matches are exact. It is still worth passing the filter
parameter to the Docker API because it reduces the number of results
passed back which may be important for remote Docker connections.

Closes 50654.

* add changelog fragment for #50654

(cherry picked from commit fd32760d7a)
6 years ago
Felix Fontein 11c1580b23 [2.7] icinga2_host: fix use_proxy option (#50865)
* fix use_proxy option in icinga2_host (#47671)


(cherry picked from commit e7b91f331b)

* Move changelog fragment to changelogs/fragments/.
6 years ago
cahlchang 12ee5c9f6e [Backport #46774] fix ec2_instance check mode 6 years ago
Felix Fontein c532169697 docker_volume: revert #47390 (#50663)
* Revert "Fix option change detection / force support for docker_volume. (#47390)"

This reverts commit 8ef994fbc5.

* Update changelog.

* Adjusting tests.

(cherry picked from commit 0e7a9a2771)
6 years ago
Abhijeet Kasurde f201aa8948 [Backport 2.7] VMware: Fix vmware_vm_inventory
* Added documentation around using vmware dynamic inventory plugin
* Fixed bug for populating host_ip in hostvars for given inventory host
* VMware: Add properties in vmware_vm_inventory

Fixes: #50249

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit af914695e6)
6 years ago
Brian Coca d20040296b added missing docs for option in acl module (#50775)
* added missing docs for option in acl module
* remove acl from ignore

(cherry picked from commit 91d8383898)
6 years ago
Nathaniel Case 41c98d208b Move errors from import to connect (#50034) (#50036)
* Move errors from import to connect (#50034)

(cherry picked from commit bf4ad56479)

* Add changelog fragment.
6 years ago
Nathaniel Case 79a281737b [2.7] Log netconf connection a la paramiko (#50169)
(adapted for 2.7 from commit 806b90f)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
6 years ago
Felix Fontein 20eaebd9b2 [2.7] openssl_pkcs12: fix ca_certificates path expansion (#50697)
* Expand user and variables in ca_certificates paths.

This is a fix specific for stable-2.7. In devel (and stable-2.8),
this problem is fixed by #48473. That PR adds argument spec
validation for list elements.

* Add changelog.
6 years ago
trogdor_the_burninator 66720f470a [stable-2.7] Add AIX support to reboot module (#50353)
* Add ability for reboot module to work for AIX

* changelog for AIX reboot support.
(cherry picked from commit 1dac10e5c3)

Co-authored-by: trogdor_the_burninator <gforster@users.noreply.github.com>
Signed-off-by: Sam Doran <sdoran@redhat.com>
6 years ago
Zim Kalinowski 4df207d963 Backport/2.7/49758 (#50121)
* resolved conflicst

* adding fragment

* generalize using rest api

* make vmss smaller

* even smaller

* size can't be smaller

* removed some unnecessary things

* removed too much

* additional fix needed
6 years ago
Renato Orgito f70fdd0745 Backport #50448 that will fix "Authentication timeout" errors.
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.

(cherry picked from commit e7f21dd1af)

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.

(cherry picked from commit 6c41e97eee)

Add changelog fragment

(cherry picked from commit 7679a92db7)
6 years ago
Matt Martz 34809f2b02 [stable-2.7] Ensure that the src file contents is converted to unicode in diff info (#45744)
* Ensure that the src file contents is converted to unicode in diff info. Fixes #45717

* Fix up and cleanup

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

* Fix callback get_diff() tests

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

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Johann Queuniet f043b36dd3 Add changelog 6 years ago
Sam Doran 015a00e0da [stable-2.7] Reboot - Fix VMware ESXi not working by adding appropriate commands (#49637)
* Add commands for VMware ESXi

* Add changelog
(cherry picked from commit 7c8af3d684)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Arne Jørgensen a17b664b38 Fix lastpass lookup error
Fixes #42062.

(cherry picked from commit 15fb9d3bc0)
6 years ago
Josue David Hernandez e68541fa88 set ansible_os_family from name variable in os-release for clearlinux… (#49906)
* set ansible_os_family from name variable in os-release for clearlinux OS (#49639)

* set ansible_os_family from name variable in os-release for clearlinux system

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

* Add os_family for clear linux and clear linux mixes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
(cherry picked from commit 9202ef60b0)

* Adding Changelog fragment

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
6 years ago
Matt Martz 2bd8bba297 [stable-2.7] Fix reverse_inventory order to work on python3 (#49895) (#50048)
* [stable-2.7] Fix reverse_inventory order to work on python3 (#49895)
(cherry picked from commit a0d71e7)

Co-authored-by: Matt Martz <matt@sivel.net>

* Clarify the change made to reverse_inventory
6 years ago
Felix Fontein 4561a5007b openssl_*: prevent error when path includes no path (#50322)
* Prevent error when path includes no path.

* Add changelog.

(cherry picked from commit 5c5cd2dc4d)
6 years ago
Felix Fontein 7ced444af8 openssl_csr: idempotency doesn't work correctly for keyUsage (#50361)
* Fix key usage idempotency bug.

* Extend tests.

* Add changelog.

(cherry picked from commit a5bf71ac6a)
6 years ago
Adam Miller 755761e3a4 Backport/2.7/50242 firewalld missing port protocol (#50493)
* Fix firewalld module failing on missing protocol. (#50242)

Under Python 3.7 at least, the split of the port field fails
ungracefully if there is no slash. The fix also addresses the
case of an empty protocol after the slash.

(cherry picked from commit 69deb73803)

* add changelog for #50242 (#50480)

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit b81a74f551)
6 years ago
Adam Miller 853d464ed1 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>
(cherry picked from commit ca084889c7)
6 years ago