Commit graph

40393 commits

Author SHA1 Message Date
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)
2019-03-11 12:52:49 -07:00
Jordan Borean
b658139d63 test: fix get_url issues in CI for Ubuntu 14.04
(cherry picked from commit 0f2041abbd)
2019-03-11 12:50:35 -07:00
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)
2019-03-11 11:53:23 -07:00
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)
2019-03-11 11:53:04 -07:00
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)
2019-03-11 11:52:43 -07:00
Felix Fontein
9135dbd820 Trying to work around spurious test failures. (#53472)
(cherry picked from commit e4f2e15b96)
2019-03-11 11:51:49 -07:00
Sandra McCann
82ccbd939c Clarify that do until loops are unsupported on include tasks (#49581) (#53628)
(cherry picked from commit 0d7e95b4db)
2019-03-11 13:50:36 -05:00
Felix Fontein
63b2794607 Warn user to send a password if the privatekey is password protected (#53360) (#53527)
* Warn user to send a password if the privatekey is password protected on openssl_cert and openssl_csr docs 

Co-Authored-By: johnwesley <johnwesley@users.noreply.github.com>
2019-03-11 13:50:13 -05:00
Sloane Hertel
96aa6babc1 Mark ec2_vpc_vgw as disabled to avoid hitting the resource limit (#53082)
* Mark ec2_vpc_vgw as disabled to avoid hitting the resource limit (#53082)

(cherry picked from commit c4d0c58c5a)
2019-03-08 22:39:38 -08:00
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.
2019-03-06 14:48:32 -08:00
Felix Fontein
3eccd83891 openssl_csr: improve invalid SAN error messages (#53201)
* Improve invalid SAN error messages.

* Add changelog.

(cherry picked from commit 628326b879)
2019-03-06 14:47:40 -08:00
Felix Fontein
3d351c5367 2.7 way to make sure no SANs are there. 2019-03-06 14:46:52 -08:00
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)
2019-03-06 14:46:52 -08:00
Jordan Borean
ba261abe29 re-add EAP to Stop for older branch 2019-03-06 14:28:41 -08:00
Jordan Borean
8bb830c1b4 win_chocolatey_source - fix state=disabled with no source (#53097)
(cherry picked from commit be7768efc7)
2019-03-06 14:28:41 -08:00
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