Commit graph

40328 commits

Author SHA1 Message Date
Jordan Borean
bfe072c9dc winrm - try and recover from a send input failure (#53187)
(cherry picked from commit ae24bbff4a)
2019-03-06 14:28:06 -08:00
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>
2019-03-06 14:21:51 -08:00
Sandra McCann
2f0b727acf backport correct examples (#53411) 2019-03-06 14:36:04 -06:00
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.
2019-03-04 12:02:39 -08:00
Felix Fontein
72f4d1b22b Make clear which option is used by which provider. (#53208)
(cherry picked from commit 6b948ab031)
2019-03-04 12:02:18 -08:00
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
2019-03-04 12:00:49 -08:00
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)
2019-03-04 07:37:39 -08:00
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.
2019-03-04 07:35:22 -08:00
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.
2019-03-04 07:34:14 -08:00
Chris Adams
59beb460d8 docs: SAN prefixes are required for openssl_csr (#53144)
The openssl_csr docs use “should” where (at least following IETF nomenclature) “must” would be more accurate.

See #53141 

+label: docsite_pr

(cherry picked from commit 14d4a4fc3b)
2019-03-04 07:30:33 -08:00
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 d16ec175fcc17f29e081f4fab4d8b9fc5842ebae)
2019-03-04 07:30:12 -08:00
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 85bd54dfa7dfc710d5a4eafecd077338e47382ab)

* Fixed lvol ValueError with float size.

(cherry picked from commit ecdd835b6c98e36d51c2784358d3a7c79fc7175f)

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

(cherry picked from commit d187b9592932d99ea3bdcecba8f038c45d14dac3)

* Added changelog fragment.

(cherry picked from commit d1f6b1220c4412dd18deb6f0574cf82caf949029)

* Used C locale instead of relying on system locale.

(cherry picked from commit 90b3d968690bbd7bfdc670f91f3cfd7b39dc6534)
2019-03-04 07:29:24 -08:00
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>
2019-03-02 12:27:46 -08:00
Tony Finch
9c7d36ccb5 get_url: return no change in check mode when checksum matches
Signed-off-by: Tony Finch <dot@dotat.at>
2019-03-01 15:29:46 -08:00
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.
2019-03-01 15:26:48 -08:00
Piotr Wojciechowski
9e40404d9a Documentation update for labels operations on swarm/node (#53083)
* Update lib/ansible/modules/cloud/docker/docker_node.py
* Update lib/ansible/modules/cloud/docker/docker_swarm.py

Co-Authored-By: WojciechowskiPiotr <23406016+WojciechowskiPiotr@users.noreply.github.com>
(cherry picked from commit ec4cf26d60)
2019-03-01 15:25:24 -08:00
Felix Fontein
8b9c96aad5 Diff feature is only available in devel. 2019-03-01 15:25:24 -08:00
Felix Fontein
25ca40de88 docker_swarm: more integration tests (#53035)
* Add more tests.

* Added tests for CA options.

* Don't run in docker-in-docker situations where docker daemon becoming instable is really dangerous. Also, restart docker daemon after tests.

* Only run CA tests when openssl_certificate can be run (which is not the case for RHEL7, see #34054).

* Add comment on why docker-based CI runs are skipped.

(cherry picked from commit 04bfec9dfe)
2019-03-01 15:25:24 -08:00
Felix Fontein
05f7fbc93a docker_swarm: fix ca_force_rotate idempotency (#53039)
* Fix ca_force_rotate idempotency.

* Add changelog.

(cherry picked from commit dec97381bc)
2019-03-01 15:25:24 -08:00
Felix Fontein
c4144398bb Fix force when state==present. (#53003)
(cherry picked from commit 76e0e0080b)
2019-03-01 15:25:24 -08:00
Felix Fontein
7c500a4002 docker_swarm: extend tests (part I) (#53005)
* Restructure tests.

* Allow tests to work when ansible_default_ipv4.address is undefined.

(cherry picked from commit e017d94766)
2019-03-01 15:25:24 -08:00
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)
2019-03-01 15:25:24 -08:00
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)
2019-03-01 15:25:24 -08:00
Felix Fontein
7a9e7daf44 Improve documentation on remote_addrs. (#52893)
(cherry picked from commit 3c39fe5871)
2019-03-01 15:25:24 -08:00
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)
2019-03-01 15:25:24 -08:00
Wojciech Sciesinski
8ae9f99979 Don't run integration tests for OS'es older than Windows 2016 (#53057) 2019-03-01 15:23:22 -08:00
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)
2019-03-01 15:13:11 -08:00
Mario Lenz
2aa96cdec5 [Backport 2.7] VMware: Fix KeyError in vmware_host_config_manager 2019-03-01 15:12:57 -08:00
s-hertel
88106ce626 fix no_log indentation so AWS temporary credentials aren't displayed in tests
(cherry picked from commit 6cacbcba665af685608253d16275d3bcf33dfa79)
2019-03-01 15:11:42 -08:00
Felix Fontein
2c1381aeb5 Don't die when kernel memory accounting is not supported by runc build. (#53163)
(cherry picked from commit e4c2cbcca2)
2019-03-01 09:35:18 -08:00
Sandra McCann
f56c3fdc89 add link to AWS module details (#53126)
* add link to AWS module details (in 2.7 docs to stable-2.7 branch)
2019-02-28 13:41:10 -06:00
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)
2019-02-27 08:35:22 -08:00
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)
2019-02-27 08:23:50 -08:00
Brian Coca
a79523acff Loader invalid plugin nicer error (#52754)
* stop processing invalid plugins

(cherry picked from commit 514b974182)
2019-02-26 10:42:04 -08:00
Dag Wieers
6c131061a0 ACI: Fix examples in documentation 2019-02-26 10:19:14 -08:00
Jordan Borean
441e4ff99f win_certificate_store - Fix exception handling typo (#52906)
(cherry picked from commit 1126f76d4d)
2019-02-26 10:15:40 -08:00
Jordan Borean
788ba0b911 OpenSUSE - Add OpenSUSE 15 test containers (#52793)
* OpenSUSE - Add OpenSUSE 15 test containers ci_complete

* Reset matrix back to normal

* Set container version instead of latest

* Remove old Docker completion file

(cherry picked from commit 3635c59b23)
2019-02-26 10:15:18 -08:00
Dag Wieers
6ac135e8b3 [Backport 2.7] Add missing ConnectionError imports
Small fix

(cherry picked from commit 51c5e60e49)
2019-02-26 10:13:49 -08:00
rockandska
affba46115 Fix idempotence in rabbitmq_plugin (#52166)
* Fix idempotence in rabbitmq_plugin

* Add changelog fragment

(cherry picked from commit 540b07b884)
2019-02-26 10:07:00 -08:00
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)
2019-02-22 11:04:29 -08:00
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)
2019-02-22 10:45:17 -08:00
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
2019-02-22 10:44:19 -08:00
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)
2019-02-22 10:43:12 -08:00
Jordan Borean
bcd1289ff2 Suse add py3 package vars (#52794)
(cherry picked from commit 80652ad054)
2019-02-22 10:42:34 -08:00
Jordan Borean
cc45ba277c test - add setup target that creates the nobody user (#52750)
* test - add setup target that creates the nobody user

* do not set explicit gid/uid for nobody user

* Do no create group and only touch basic attributes

(cherry picked from commit 17bfc60423)
2019-02-22 10:42:11 -08:00
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)
2019-02-21 19:27:10 -08:00
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)
2019-02-21 19:26:39 -08:00
Alan Rominger
ac4447f2c4 Plugin errors backport (#52749)
* Fix missing tracebacks in ansible-inventory

(cherry picked from commit b62693299b3d561c9a0a78c6c8e440f3c623b5d1)

* remove usless tb initiator

  always pass proper tb
2019-02-21 19:26:10 -08:00
Jordan Borean
eb1f8e60e0 test - add Python 3 package for OpenSUSE in setup_openssl (#52775)
(cherry picked from commit 63c22f6eb0)
2019-02-21 17:06:48 -08:00
Jordan Borean
f1566f07db fix filesystem tests on OpenSUSE 15+ (#52716)
(cherry picked from commit 5e3e0eb946)
2019-02-21 17:06:01 -08:00