Commit Graph

2507 Commits (3c484831f87035db7eeb7ed405f905c134b56a53)

Author SHA1 Message Date
Brian Coca 3c484831f8 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
Brian Coca 1d0d2645ee
prevent ansible_facts injection (#68431) (#68446)
* 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)

* add to ignore
5 years ago
Brian Coca 4e1fe80e68 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 1a89d4f059
[2.7] CVE-2020-1739 - provide password securely for subversion module or warn (#68913)
* 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)

* Create the OUTPUT_DIR and make sure it is removed at the end

* fix sanity test
5 years ago
Sam Doran 8cccb33d71
[stable-2.7] win_unzip - normalize and compare paths to prevent path traversal (#67799) (#67938)
* 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)

* Fix tests for 2.7
5 years ago
Matt Clay c59d722d98 [stable-2.7] 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 3d8d43bd4c
OpenSUSE15.1 container image + necessary test changes (2.7 edition) (#68801)
* 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>

* 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>

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

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

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
René Moser f8de20b3b0 [stable-2.7] tests: ipify_facts: retry on fail (#66897)
(cherry picked from commit 91063f40d6)

Co-authored-by: Rene Moser <mail@renemoser.net>
5 years ago
Matt Clay f0e832c30b
[stable-2.7] Remove Tower module tests from CI. (#67368) (#67373)
* 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>
5 years ago
Matt Clay 9f60b16d31 [stable-2.7] Add constraints for Jinja2 on Python 2.6. (#66826)
* Add constraint for Jinja2 on Python 2.6.

* Fix constraint in inventory_aws_conformance test.

* Add constrraints for template_jinja2_latest test..
(cherry picked from commit 965854fbd2)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 2b57127c64 [stable-2.7] Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container..
(cherry picked from commit 51e5b714e0)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay e75fcd8b13 [stable-2.7] Disable failing azure_rm_storageaccount test.
(cherry picked from commit 342b9953bc)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Justin Ossevoort 92e6db7431 [stable-2.7] Fix 'Assert CNAME failure' assertion (#65875)
(cherry picked from commit 14ebceec25)

Co-authored-by: Justin Ossevoort <github@internetionals.nl>
5 years ago
Jordan Borean ab910e1f5a win_psmodule - remove reliance on PSGallery in the tests for stable-2.7 (#64468)
* win_psmodule - remove reliance on PSGallery in the tests for stable-2.7

* Ignore non-powershell files from sanity check
5 years ago
Sam Doran 0fd656e996 [stable-2.7] Properly mask no_log values is sub parameters during failure (#63405)
(cherry picked from commit 156330b485)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Jill R b65984981f [stable-2.7] Fix STS assume role error message when role does not exist (#63249)
AWS appears to have changed this error message again.
Fixes https://app.shippable.com/github/ansible/ansible/runs/145643/115/tests
(cherry picked from commit ce402f003f)

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Matt Martz 40618d70e6 [stable-2.7] Wrap CLI passwords as AnsibleUnsafeText (#63352) (#63392)
* [stable-2.7] Wrap CLI passwords as AnsibleUnsafeText (#63352)

* isa string should rewrap as unsafe in get_validated_value

* _is_unsafe shouldn't be concerned with underlying types

* Start with passwords as text, instead of bytes

* Remove unused imports

* Add changelog fragment

* Update changelog with CVE.
(cherry picked from commit baeff7462d)

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

* Update tests
5 years ago
s-hertel 00a65ac1ed Mark aws_s3 tests as unstable 5 years ago
Matt Clay 62138612c8 [stable-2.7] Start dbus when setting up postgresql tests.
(cherry picked from commit c309570540)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein 6ec0632bec [stable-2.7] Re-enable docker_container tests (#59425)
Mark dependent container's ipc_mode as shareable
(cherry picked from commit 266d6e77a9)

Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Sloane Hertel df7e6c147b disable s3_lifecycle tests (#59311)
(cherry picked from commit 1d3f2c7764)
5 years ago
Sam Doran 3f0de5c438 [stable-2.7] Improve setup_docker tests to work with RHEL 8 GA (#58649)
- use include_vars to set appropriate packages and pip packages per distribution and version
- install an older version of Docker CE on RHEL 8 since a dependency is unavailable
- disable warnings on tasks that are ok
- skip tests for CentOS/RHEL 6.
(cherry picked from commit d50c8c2b83)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 9b1575cfeb [stable-2.7] Improve dnf test formatting and fix RHEL 8 module name (#58648)
- use single include_vars task rather than multiple set_fact tasks
- use multi-line YAML to break up long conditionals
- use version() test rather than direct comparisions
- use different appstream package on RHEL since '@swig:3.0/default' is not working in the GA.
(cherry picked from commit 16d6fcf514)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 28816088e4 Make nuage_vspk test more reliable
- don't background the nuage-vsd-sim
- increase the asncy timeout
- use uri to actually query the simulator API to make sure it is ready for connections

(cherry picked from commit 911a2ec6d3)
6 years ago
Matt Clay 1a2bafa510 [stable-2.7] Fix nuage_vspk integration test:
- Wait for API to be ready.
- Enumerate test cases on controller.
(cherry picked from commit 29de0619e8)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay 4f1ea957bc [stable-2.7] Add work-around for scp issue in tests.
(cherry picked from commit 414ac12ddd)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Sam Doran a9288b3c53 [stable-2.7] passwordstore lookup - replace expired GPG key (#58141)
- Replace private key that expired an 2019-06-20 with a key that does not expire
- Document how to generate a new GPG key using an input file
(cherry picked from commit b9d77b997e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Sam Doran 84c4fb38bd [stable-2.7] Change integration tests in order to pass on Fedora 30 (#58081)
* Use different package for DNF tests
    Ninja caused errors in Fedora 30. This works in both Fedora 29 and 30.

* Fix git integration tests
    Git >= 2.21.0 has either a bug or change in behavior where it errors when fetching a
    repository containing submodules that are behind the upstream submodule commits.
    It's weird and I don't fully understand it.

    Get around this my checking out specific commits from a repository rather than
    switch the origin URL.

* Fix PostgreSQL tests
    The error message is slightly different.
(cherry picked from commit 18feeb51a8)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Brian Coca a11c3edfa4 safe_eval fix (#57188)
* just dont pass locals

 - also fix globals
 - added tests

* fixed tests

(cherry picked from commit b9b0b23015)
6 years ago
Felix Fontein 0b5ab1e041 Fix assignments in docker tests. (#57249)
(cherry picked from commit 7cd229aa97)
6 years ago
Matt Clay e045506876 [stable-2.7] win_get_url: ignore defender false positive in tests (#56825)
* [stable-2.7] win_get_url: ignore defender false positive in tests (#56812)
(cherry picked from commit 124400f319)

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Adapt tests to work without remote_tmp_dir.
6 years ago
Strahinja Kustudic 6bc671a46a Backport/2.7/55695 (#56253)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

(cherry picked from commit 0432b7f252)

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

(cherry picked from commit a16128f778)

* Add changelog fragment for sysctl

(cherry picked from commit 3ad9d4d83c)
6 years ago
Paul Belanger 9c670d9d05 Fix vyos_command integration test (#56091)
This has been broken for some time, but only noticed recently.  Because
vyos_command isn't supported on ansible_connection=local, update our
testing to account for that.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 59d20e004e)
6 years ago
Felix Fontein d9d5cca69e oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.

(cherry picked from commit f692261ea0)
6 years ago
Felix Fontein 13862f8f34 Adjust to stable-2.7 return value names. 6 years ago
Felix Fontein 5daef29e4d docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.

(cherry picked from commit 95d1564f70)
6 years ago
Jordan Borean 3db80f68f7 win_acl - fix network path qualifier parsing (#55970)
(cherry picked from commit cc3b8b9f72)
6 years ago
Matt Martz 616763e290 [stable-2.7] Bump erlang ping to 1:20.3.8.18-1
(cherry picked from commit 4b00141)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Matt Clay a44b62a2dd [stable-2.7] Install rabbitmq from s3 in tests..
(cherry picked from commit e105f5b436)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Sam Doran 5ab7ec153f Properly reset timezone in user test when it was originally n/a (#55389)
(cherry picked from commit b4e83642c8)
6 years ago
Jordan Borean d9c065d217 win_service - simply env test (#55498)
(cherry picked from commit 62badd76a5)
6 years ago
Felix Fontein ed1640e9dc [2.7] docker_container: fix support for docker-py 1.7.0 (#55496)
* In theory, some 2.7 modules support docker-py 1.7.0.

* Add changelog.
6 years ago
Jordan Borean ab725bb86e psrp - Fix raw and script tests for connection plugin (#55357)
* psrp - Fix raw and script tests for connection plugin

* Fix error propagation with raw in psrp

* uncomment test

(cherry picked from commit fdf9df89f5)
6 years ago
Jordan Borean 8d259f6e64 psrp - fix test_command rc for win_reboot (#55354)
(cherry picked from commit 49655a452d)
6 years ago
Jordan Borean 01eb82cb40 win_feature - get tests working on psrp (#55353)
(cherry picked from commit 15c331cb48)
6 years ago
Jordan Borean b0f6ca287b win_whoami - Fix tests to work over psrp (#55352)
(cherry picked from commit 33c2a9cea7)
6 years ago
Felix Fontein f27481a6e8 docker_container: improve log_options idempotency by converting to string (#54955)
* Warn when log_options values are not strings.

* Add changelog.

* Improve message.

* Improve formatting and formulation of other messages.

* Add test for warning.

* Trying double escaping.

(cherry picked from commit d64b17731d)
6 years ago
Jordan Borean 6814d1cb57 Increase async timeout for psrp connection test (#55068)
(cherry picked from commit 58e076b64c)
6 years ago
Matt Clay f030191782 [stable-2.7] Fix apache shutdown in subversion test.
(cherry picked from commit 58f4947ffe)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Robert Osowiecki 910d21e15c Allow all of yum version compare operators (#54603)
* Allow all of yum version compare operators

* * yum: name="foo >= VERSION" integration test
* changelog fragment

(cherry picked from commit 1532e31ec0)
6 years ago