Commit Graph

9348 Commits (ec73968b5dd8fbadaf06ecaca7a9d919f0188c1f)

Author SHA1 Message Date
Martin Nečas 1432a947e7
ovirt_disk: add warning when uploading wrong format (#69153)
* ovirt_disk: add warning when wrong format

* add changelog

* Update ignore.txt
5 years ago
Andrew Klychkov 7cb8594e97 Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string (#67418)
* Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string

* fix CI

* add changelog

(cherry picked from commit 59bcc9f739)
5 years ago
Martin Krizek 70b4ce5efd
2.9: native types: literal_eval all the things (#68938) (#69044)
* native types: literal_eval all the things (#68938)

With https://github.com/pallets/jinja/pull/1190 merged our short-circuit
is no longer valid (has it ever been?) as now data like ' True ' may go
through our ansible_native_concat function as opposed to going through
intermediate call to Jinja2's native_concat before. Now we need to always
send data through literal_eval to ensure native types are returned.

(cherry picked from commit acdc9eb76d)

* Fix tests
5 years ago
Brian Coca b3a1288150 preserve json parsing error (#58461)
* preserve json parsing error
* added test

(cherry picked from commit bbdf77a59f)
5 years ago
Matt Martz e2f7676c5a [stable-2.9] Allow a collection role to call a standalone role by default (#69102)
* Allow a collection role to call a standalone role by default. Fixes #69101

* tweaked changelog text

* Guard against NoneType

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>.
(cherry picked from commit da98fc267a)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Brian Coca f8a5377cc6 Fix fileglob when using 'file*' vs 'stuff/file*' (#68945)
* Fix fileglob when using 'file*' vs 'stuff/file*'

 when not having dir in glob, files/ subdir was being ignored.

* tests for fileglob

(cherry picked from commit d3cab602a5)
5 years ago
Abhijeet Kasurde 17458a16ca influxdb: Fix documentation (#67807)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit ed306c7991)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Rick Elrod b4d66c4991 Add RHEL 8.2 to CI
Change:
RHEL 8.2 GA was released this week, test it in CI instead of 8.1.

Test Plan:
CI

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod 4a20196492 Enable dnf integration tests on CentOS 8
Change:
We were only testing dnf on RHEL previously.
Test on CentOS 8 as well.

Test Plan:
Ran locally in docker.

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod 07084217dc [dnf] Make behavior/errors compatible for new DNF
Change:
Extend the logic for custom error handling in the dnf module, so that on
newer DNF (such as DNF that ships with modern Fedora 31 container
images, and ships with RHEL 8.2) we report errors consistently with
older DNF.

Test Plan:
Ran dnf integration tests against an old Fedora 31 container image and a
brand new Fedora 32 container image; tess passed on both.

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Matt Clay 8f1a614428 [stable-2.9] Remove obsolete vcenter setup from ansible-test..
(cherry picked from commit a050d892d8)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Rick Elrod e4a5b4b797 [stable-2.9] pip - Fix check_mode for prerelease packages (#68690)
* pip - Fix check_mode for prerelease packages

Fixes #68592.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 82c60db49b)

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Brian Coca 290bfa820d fixed fetch traversal from slurp (#68720)
* fixed fetch traversal from slurp

  * ignore slurp result for dest
  * fixed naming when source is relative
  * fixed bug in local connection plugin
  * added tests with fake slurp
  * moved existing role tests into runme.sh
  * normalized on action excepts
  * moved dest transform down to when needed
  * added is_subpath check
  * fixed bug in local connection

fixes #67793

CVE-2019-3828

(cherry picked from commit ba87c225cd)
5 years ago
Sloane Hertel d41e38435b
[2.9] CVE-2020-1746 - Remove the params module option from ldap_attr and ldap_entry (#68714)
* Remove the params module option from ldap_attr and ldap_entry

Module options that circumvent Ansible's option handling were disallowed
in:
https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html

Additionally, this particular usage can be insecure if bind_pw is set
this way as the password could end up in a logfile or displayed on
stdout.

Fixes CVE-2020-1746

(cherry picked from commit 0ff609f1bc)

* Fix formatting for option names

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

* Fix fail_json

* fix indentation error

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Brian Coca 0b4788a71f prevent ansible_facts injection (#68431)
- also only replace when needed
 - switched from replace to index
 - added test to verify bogus_facts are not accepted

CVE-2020-10684

(cherry picked from commit a9d2ceafe4)
5 years ago
Brian Coca 51d2514753 fix vault temp file handling (#68433)
* fix vault tmpe file handling

 * use local temp dir instead of system temp
 * ensure each worker clears dataloader temp files
 * added test for dangling temp files
 * added notes to data loader

CVE-2020-10685

(cherry picked from commit 6452a82452)
5 years ago
Sloane Hertel c6c4fbf4a1 subversion module - provide password securely when possible or warn (#67829)
* subversion module - provide password securely with svn command line option --password-from-stdin when possible, and provide a warning otherwise.
* Update lib/ansible/modules/source_control/subversion.py.
* Add a test.

Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit d91658ec0c)
5 years ago
Jordan Borean b2551bb694
ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 - 2.9 (#68601)
* ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 (#68596)

(cherry picked from commit a20a527014)

* Remove extra tests missing from rebase
5 years ago
Florian Apolloner 3bebeb9cc3 Fixed mysql_user module idempotency for long privilege lists. (Fixes #68044) 5 years ago
nkshrishail ea4f6e1539 nxos_lacp: updated tests to handle platforms not supporting lacp system mac command (#64074)
* Updated nxos_lacp tests to handle platforms not supporting lacp system mac command

* nxos_lacp: addressing comments

* nxos_lacp: Updating image tag search to include more tags

(cherry picked from commit 00193f27eb)

Add changelog for nxos_lacp fix
5 years ago
Egor Zaitsev 852b64b3ba
routeros_facts: prevent crash of module when ipv6 package is not installed (#68554)
* routeros_facts: fix crash when ipv6 is disabled

* Update 64958-routeros-facts-ipv6.yml
5 years ago
Abhijeet Kasurde eec5cc4f73 [2.9] VMware: Use existing DVPG network in vmware_guest_network
* Handle all cases of networks

Fixes: #65968

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit afb71c14bd)
5 years ago
Sam Doran 0e51aadd8e
[stable-2.9] Add CentOS 8 to the test matrix (#68025)
* Add CentOS 8 to the test matrix (#63649)

(cherry picked from commit 2a7623dd5c)

* Skip PostgreSQL tests on CentOS 8

The tests in devel have diverged significantly from what is in
stable-2.9. It is easiest to skip these test for CentOS 8 in this branch
since they are still being run in devel.
5 years ago
Graham Mainwaring 32f41334fb Fix colorization to not extend across newline boundary (#68517)
* Fix colorization to not extend across newline boundary

* Fix unit test to look for the newline outside the coloration

* Add changelog fragment

(cherry picked from commit 2068131589)
5 years ago
Abhijeet Kasurde 378434a148 passwordstore: Honor equal sign in userpass
passwordstore lookup plugin now can handle equal sign in user input

Fixes: ansible/ansible#68265

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Sam Doran 1f304ef372 win_unzip - normalize and compare paths to prevent path traversal (#67799)
* Actually inspect the paths and prevent escape
* Add integration tests
* Generate zip files for use in integration test
* Adjust error message

(cherry picked from commit d30c57ab22)
5 years ago
flowerysong 938fb16069 adhoc: Load callbacks before sending v2_playbook_on_start (#67673)
(cherry picked from commit 370f788731)
5 years ago
Zhanwei Wang f7c63c1201 get_url pass incorrect If-Modified-Since header(#67417) (#67419)
Fix #67417. HTTP header value of `If-Modified-Since` set by `get_url` does not follow HTTP protocol.

(cherry picked from commit 1097694355)
5 years ago
Matt Clay bf3cd041e7 Disable failing azure_rm_cosmosdbaccount test. 5 years ago
Matt Clay 8a14392a29 [stable-2.9] Update tests to use RHEL 7.8. (#68787)
* Update tests to use RHEL 7.8.

Keeping support for RHEL 7.6 since collections are still using it.

* Fix tests for RHEL 7.7+ due to extras repo name change..
(cherry picked from commit 04edd77c42)

Co-authored-by: Matt Clay <mclay@redhat.com>
5 years ago
Rick Elrod 89937180c5 Fix win_psrepository tests
Backport of a5414cb0e4

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Rick Elrod 7a861dd2f1
OpenSUSE15.1 container image + necessary test change (2.9 edition) (#68788)
* add changelog fragment

Signed-off-by: Rick Elrod <rick@elrod.me>

* Update changelogs/fragments/ansible-test-opensuse-15.1.yml

Co-Authored-By: Matt Clay <matt@mystile.com>

* Update docker.txt to use the OpenSUSE 15.1 container image

Signed-off-by: Rick Elrod <rick@elrod.me>

* handle installing mysql on suse

Signed-off-by: Rick Elrod <rick@elrod.me>

* attempt to get tests passing again

Signed-off-by: Rick Elrod <rick@elrod.me>

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Jordan Borean d6a82e6865
galaxy - preserve mode properly on artifact (#68418) - 2.9 (#68451)
* galaxy - preserve mode properly on artifact (#68418)

* galaxy - preserve mode properly on artifact

* Fix py2 encoding issue

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Matt Clay <matt@mystile.com>

* Use sane defaults instead of sourcing from tarfile

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 127d54b363)

* added mode to dir creation that was missed in backport
5 years ago
Jordan Borean 6703ffd21d [stable-2.9] win_unzip - LiteralPath fix (#66972)
* win_unzip - LiteralPath fix

* Fix up Python sanity issues
(cherry picked from commit 2a9ec8975f)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
5 years ago
Matt Clay 8377f03eb2 Increase unit test timeouts. 5 years ago
Sam Doran 1f2758af20
ansible-galaxy - fix role list bug (#67391) (#67619)
Properly list roles even when the role name is the same or a substring of the
path to the role.

(cherry picked from commit c64202a495)
5 years ago
Jordan Borean 47fc7ab97d
galaxy - Fix collection install dep resolver for bad versions (#67405) (#67413)
* Also make sure version is a string and not an int/float

(cherry picked from commit 4881af2e7e)
5 years ago
Abhijeet Kasurde f8aaa7dcd2
[2.9] VMware: vmware_export_ovf module fix Python3 compatibility issue (#67514)
(cherry picked from commit 023a9b3166)

Co-authored-by: Diane Wang <41371902+Tomorrow9@users.noreply.github.com>
5 years ago
Jordan Borean 151d83efc3
win_credential - fix wildcard name (#67549) (#67552)
(cherry picked from commit d7059881a2)
5 years ago
Sam Doran f243b39ef3
[stable-2.9] Do not error if collection specified null dependencies (#67575) (#67618)
(cherry picked from commit cffead4631)

Co-authored-by: Alan Rominger <arominge@redhat.com>

Co-authored-by: Alan Rominger <arominge@redhat.com>
5 years ago
GomathiselviS 18377e6390
[2.9] Allow nxos_l2_interfaces to append the allowed vlans list (#67703)
* Added Fix - Allow nxos_l2_interfaces to append the allowed vlans list (#66517)

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Bug Fix 65332

* Added testcase for #66517

* Removed unnecessary commit

* fixing conflicts

* fixing conflicts

* addressed mikeweibe's comments

* Corrected lint errors

* Added idempotent tc for add vlans

* Added replaced and overridded tcs for trunk vlan add

(cherry picked from commit 4ac89b8ac7)

* backport to PR #66517
5 years ago
Sloane Hertel afb389e588
Fix inline vaults for plugins in ensure_type (#67492) (#67741)
* Fix implicit string - only looked right because of the vault __repr__
* Add tests for strings and implicit strings

(cherry picked from commit 8eb00dd14c)
5 years ago
Felix Fontein 3fb4d109ce
acme_* modules: adjust documentation to reference RFCs 8737 and 8738 instead of the drafts (#67881) (#67882)
* Adjust documentation to reference RFCs 8737 and 8738 instead of the drafts.

* More references.

(cherry picked from commit 35fd86c6bc)
5 years ago
Jordan Borean 0f7d62f6a5
ansible-galaxy - optimise some paths and use fake galaxy int tests (#67685) - 2.9 (#67874)
* ansible-galaxy - optimise some paths and use fake galaxy int tests (#67685)

* ansible-galaxy - optimise some paths and use fake galaxy int tests

* Added init, built, and publish tests

* Test against both mocked Galaxy and AH server

* Finish off writing the install tests

* Fix up broken tests

* Rename test target and add migrated tests

* Use cloud provider for Galaxy implementation

* Added blank static config

* Use correct alias group

* Set release version and fix copy typo

* Remove reset step as it is no longer needed

* Use sane env var names for test container name

(cherry picked from commit 26129fcb80)

* Use --api-key and not --token

* Set fallaxy tests as a smoketest

(cherry picked from commit b241c021b7)
5 years ago
GomathiselviS 48bfa3e906
Fix to - eos_vlans using state parameter replaced is giving odd behavior (#67346)
* backport PR 67318

* added changelog file

* Added missing fixture file
5 years ago
Jordan Borean 9c1794ebfd remove unused import 5 years ago
kaorihinata 39cfb63be6
Allow no_log=False to silence the no_log warnings for module parameters (#64733) (#67439)
As AnsibleModule._log_invocation is currently implemented, any parameter
with a name that matches PASSWORD_MATCH triggers the no_log warning as a
precaution against parameters that may contain sensitive data, but have not
been marked as sensitive by the module author.

This patch would allow module authors to explicitly mark the aforementioned
parameters as not sensitive thereby bypassing an erroneous warning message,
while still catching parameters which have not been marked at all by the
author.

Adds tests for various no_log states including True, False, and None (as
extracted by AnsibleModule._log_invocation) when applied to an argument with
a name that matches PASSWORD_MATCH.

Fixes: #49465 #64656
(cherry picked from commit 3ca4580cb4)
5 years ago
Matt Clay 227f498314
stable-2.9: Restore Tower integration tests. (#67395)
* Move tower_common tests with tower_organization.

(cherry picked from commit c92697acec)

* Test: Bump TOWER_VERSION to supported version (#67378)

* Revert "Remove Tower module tests from CI. (#67368)"

This reverts commit b041d96762.

* Test: Bump TOWER_VERSION to 3.6.2

(cherry picked from commit b9bd2c25ca)

Co-authored-by: Yanis Guenane <yguenane@gmail.com>
5 years ago
Matt Clay 6f95e9629b
[stable-2.9] Remove Tower module tests from CI. (#67368) (#67371)
* [stable-2.9] Remove Tower module tests from CI. (#67368)

* Remove Tower module tests from CI.

The required AMIs are no longer available.

* Mark Tower tests as unsupported..
(cherry picked from commit b041d96762)

Co-authored-by: Matt Clay <mclay@redhat.com>

* Mark tower_common unsupported.
5 years ago
Sam Doran 04994e8dfb [stable-2.9] ansible-test - add constraint for virtualenv (#67289)
* ansible-test - add constraint for virtualenv

* Limit virtualenv only on macOS.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 8f296a6533)

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