Commit Graph

8008 Commits (050f92f96054bf59e283fdec9972323c2ed00348)

Author SHA1 Message Date
Sam Doran 0c89a97107 [stable-2.8] copy - check for changes beyond first level of subdirectories (#58323) (#64112)
Add integration test for copy: deep recursive with remote_src=True
(cherry picked from commit b7e38dfa52)

Co-authored-by: Alexander Korsunsky <A.Korsunsky@gmail.com>
6 years ago
Robert Osowiecki ba29567210 lineinfile - don't run os.makedirs on empty dir path (#63921) (#64090)
* Fix #63919: don't run os.makedirs on empty dir path

* integration test for lineinfile create: yes without path

(cherry picked from commit 3c978a3225)
6 years ago
Sam Doran f861c284d0 [stable-2.8] lineinfile - use correct index value when inserting at the end (#63696) (#63795)
(cherry picked from commit 92cd13a2cf)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Sam Doran cbe69adf37 [stable-2.8] lineinfile - properly insert line when line exists and backrefs are enabled (#63763) (#63791)
Use a separate variable for the boolean test rather than having the same variable sometimes be a boolean and sometimes be a regular expression match object

Add integration tests to cover this scenario
(cherry picked from commit 29d4d318a5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
kamathe 95417c2260 ansible-vault: convert vault_password_files to list to prevent traceback (#57186) (#63622)
* Convert vault_password_files to a list

* Add changelog and tests
6 years ago
Jordan Borean a6687bef32 Fix issue when setting an empty pass to no_log param (#62804) - 2.8 (#62813)
* Fix issue when setting an empty pass to no_log param (#62804)

* Fix issue when setting an empty pass to no_log param

* Fix typo

(cherry picked from commit 322e225830)

* Fix up actual get for older versions
6 years ago
Matt Clay 34c76bf2a1 [stable-2.8] Switch from RHEL 8.0 & 8.1b to 8.1 in CI.
(cherry picked from commit 75646037dc)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Felix Fontein 5eac93e7fd [2.8] Fix return value documentation (2/2) (#63534)
* Fix return value documentation (2/2) (#63478)
* Avoid validation errors for missing 'contains:'.
* Convert JSON text to JSON dict.
* example -> sample.
* Fix YAML.

(cherry picked from commit 4bc298af83)

* Update validate-modules/ignore.txt.
6 years ago
Felix Fontein 293ae8030b [2.8] Fix return value documentation (1/2) (#63517)
* Fix return value documentation (1/2) (#63477)
* Avoid validation errors for missing 'contains:'.

(cherry picked from commit 6bea1597cc)

* Add validate-modules/ignore.txt entries.
6 years ago
Sam Doran 3dfb8e81bb [stable-2.8] Properly mask no_log values is sub parameters during failure (#63405)
* Get no_log parameters from subspec

* Add changelog and unit tests

* Handle list of dicts in suboptions

Add fancy error message (this will probably haunt me)

* Update unit tests to test for list of dicts in suboptions

* Add integration tests

* Validate parameters in dict and list

In case it comes in as a string

* Make changes based on feedback, fix tests

* Simplify validators since we only need to validate dicts

Add test for suboptions passed in as strings to ensure they get validated properly and turned into a dictionary.

ci_complete

* Add a few more integration tests
(cherry picked from commit e9d29b1fe4)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
James Cassell b7fe3407c3 clean "changed" only after it has been processed (#59958)
* clean "changed" after it has been processed

without this change, a loop of `debug` tasks with `changed_when`
causes the "changed" status to get lost before output

* runme.sh tests for debug loop status

(cherry picked from commit bfd32c9b00)
6 years ago
Andrey Klychkov 3d8df9de72 lineinfile - fix bug with insertbefore/insertafter and firstmatch (#63194)
(cherry picked from commit 3b18337cac)
6 years ago
Matt Martz 2cbd8775ca [stable-2.8] 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 baeff74)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Adam Miller 3c58d5f793 adapt to firewalld 0.7.0 for RHEL 8.1 Beta, Fedora 31+
Fixes #63254

Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Matt Clay e6a49f2e96 [stable-2.8] Add RHEL 8.1b to the Shippable test matrix.
(cherry picked from commit 811127d64d)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Jill R 2ccfc29b7e [2.8] Fix STS assume role error message when role does not exist (#63305)
* 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

* [2.8] Fix STS assume role error message when role does not exist

* fix changelog sanity
6 years ago
Sam Doran ca830ef42d [stable-2.8] cronvar - use correct binary name (#63279)
(cherry picked from commit 9d014778ad)
6 years ago
Pilou b64c3c42bd [stable-2.8] cron: add integration tests (#59830)
(cherry picked from commit 3c8abc0b82)
6 years ago
Felix Fontein 4b2992c203 docker_container: improve image finding / change detection (#62971)
* Improve image finding / change detection.

* Checked wrong object.

* Improve behavior. (Let docker daemon sort this out.)

* Add changelog.

* Add simple test.

* Fix image name.

* Use new docker_image params.

* Rewrite.

(cherry picked from commit 41eafc2051)
6 years ago
Adam Miller d25b46b3dc dnf - properly handle idempotent removal of wildcard globs (#63034)
Signed-off-by: Adam Miller <admiller@redhat.com>
6 years ago
Felix Fontein ddd9f6081e [2.8] docker_container: fix idempotency for network IP addresses (#62959)
* docker_container: fix idempotency for network IP addresses (#62928)

* Specifying IP addresses needs API version 1.22 or newer.

* Simplify code.

* Use IPAMConfig.IPv*Address instead of IPAddress and GlobalIPv6Address.

* Add changelog.

* Fix syntax errors.

* Add integration test.

* Don't rely on netaddr.

* Normalize IPv6 addresses before comparison.

* Install netaddr, and use it.

(cherry picked from commit 62c0cae29a)

* Remove IPv6 tests, use intermediate state of tests from PR which don't need ipaddr filter.
6 years ago
Matt Clay 5b0a67062a [stable-2.8] Work around ssh-keygen issue in ansible-test. (#63211)
Newer versions of ssh-keygen create PEM keys that are not recognized by Paramiko.

Now ansible-test compensates for this by updating they keys it generates so Paramiko will recognize them..
(cherry picked from commit 022335669c)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay dce682fc3e [stable-2.8] Install zip for unarchive test when using dnf.
(cherry picked from commit 86ae3cfa12)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay e80a771f84 Limit Shippable matrix check to ansible repo.
(cherry picked from commit ada02f1966)
6 years ago
Matt Clay 68de8e1986 Replace old shippable.py with new check_matrix.py. (#60022)
This new script does not depend on ansible-test and provides much more robust job matrix testing.

It is also run on every job in the matrix now, to detect issues with jobs being re-run after matrix changes are made.

(cherry picked from commit d3da8e4a5b)
6 years ago
Matt Clay f43110b0ed [stable-2.8] Mark ansible-test cloud credentials as sensitive..
(cherry picked from commit 9f7b124a6f)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay d8bd6ea72f [stable-2.8] test: disable hcloud_floating_ip_info
Temporarily disable `hcloud_floating_ip_info`, this until #62414 is
resolved..
(cherry picked from commit edf15b346f)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
6 years ago
Felix Fontein 0f7ed58718 Re-enable some docker_swarm tests. (#61875)
(cherry picked from commit 098a13dff4)
6 years ago
Matt Martz 98fc6a627c [stable-2.8] Don't treat no checksum as a checksum match (#62146)
Fixes #61978
* moar tests for get_url fetch behavior with existing file
* add changelog fragment
(cherry picked from commit 7d51cac)

Co-authored-by: Matt Martz <matt@sivel.net>
6 years ago
Sam Doran 08bff987d9 [stable-2.8] Split unit tests into two groups (#61528) (#62070)
* [stable-2.8] Fix ansible-test coverage path handling. (#61528)

* Fix ansible-test coverage path handling.
* Split CI unit tests into two groups..
(cherry picked from commit e4e5005640)

Co-authored-by: Matt Clay <matt@mystile.com>

* Increase unit test timeout to account for long image download times (#61717)

(cherry picked from commit c9e7a2122d)
6 years ago
Matt Clay c01378a299 [stable-2.8] Mark AWS credentials in ansible-test as sensitive.
This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
(cherry picked from commit b73e772)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay c284e40866 [stable-2.8] Redact sensitive values by default in ansible-test.
(cherry picked from commit 0631e057e9)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Andrey Klychkov 2d967c3537 Backport of 62135: fix typos in modules (#62170) 6 years ago
Andrey Klychkov 97eba0fc60 Backport of 62125: Fix typos in database modules and their integration tests (#62173) 6 years ago
Andrey Klychkov 255754a4d1 Backport of 62194: fix typos in cloud modules (#62277) 6 years ago
Jordan Borean 770e10ca60 win_template - use shared doc fragment for shared options (#59701) (#59828)
* win_template - use shared doc fragment for shared options (#59701)

* win_template - use shared doc fragment for shared options

* Change smart quote to em dash and fix whitespace issue

(cherry picked from commit 652bfc7e19)

* template - move backup to its own doc (#59893)

* template - move backup to its own doc

* Use the backup doc fragment for template

(cherry picked from commit 737a500a30)
6 years ago
Gonéri Le Bouder 659147b2e2 VMware: not ssl.SSLContext if validate_certs false (#57185)
Python < 2.7.9 does not have the ssl.SSLContext attribute.
ssl.SSLContext is only required when we want to validate the SSL
connection. If `validate_certs` is false, we don't initialize the
`ssl_context` variable.

Add unit-test coverage and a little refactoring:

- avoid the use of `mocker`, when we can push `monkeypatch` which is
  `pytest`'s default.
- use `mock.Mocker()` when possible

closes: #57072
(cherry picked from commit 3ea8e0a144)
6 years ago
Sam Doran b9769abde7 [stable-2.8] test: disable the docker swarm tests (#61816) (#61862)
`docker_swarm` tests tend to hang during the creation of the Swarn
cluster.

See: https://github.com/ansible/ansible/issues/61815
(cherry picked from commit 7132466327)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
6 years ago
Sam Doran 446df8d2cb [stable-2.8] Use new version of default test image that contains Python 3.8.0b3 (#60139)
(cherry picked from commit a20848bf66)

Co-authored-by: Sam Doran <sdoran@redhat.com>
6 years ago
Strahinja Kustudic e7fcb37e6c Fix extended loop_control with includes (#61231)
* Fix extended loop_control with includes

* Use assert for testing extended loop_control

* fix typo

(cherry picked from commit a213b9160c)
6 years ago
Wojciech Wypior 99f9eab19d fixes assert statements in tests (#59998)
(cherry picked from commit d00aaf66d7)
6 years ago
kucharskim c087030e5c [stable-2.8] Allow 13 asterisk characters in password field without warning (#54893)
On OpenBSD, 13 asterisk characters as a password hash, marks the
account as disabled. Otherwise daily(8) script which executes
security(8) will email operator about not properly locked accounts.

Before the diff, we see following warning:

> [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.

After the diff, warning is gone..
(cherry picked from commit 1dea661ce8)

Co-authored-by: kucharskim <mikolaj@kucharski.name>
6 years ago
Jordan Borean 7c752a43b3 Set win_pagefile as unstable as thats what it is (#61732)
(cherry picked from commit 00add5b668)
6 years ago
Kevin Breit 6310e96034 [stable-2.8] - meraki_syslog - Properly handle net_id (#61744)
* meraki_syslog - Module properly handles net_id parameter (#57286)

(cherry picked from commit a50b3d7695)

* Add changelog fragment and clean up commented tests
6 years ago
Andrey Klychkov e1922be671 postgresql: Run all tests under postgres_* (#61676)
* Make sure postgresql tests are run for all postgres_* modules (#61647)

(cherry picked from commit 4d057e0331)

* Make sure postgresql tests are run for all postgres_* modules (#61647), remove non-existent
6 years ago
Paul Belanger d71d111c3a Fix nxos_install_os test cases typo (#58825)
This should be ansible_connection, not connection_type. We can also
update local testing logic.

Remove nxos_install_os/tasks/network_local.yaml as it is nolonger used.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 9e1b19e364)
6 years ago
rob8714 9fe0971004 Backport/2.8/57418 (#60683)
* Backport to stable-2.8: Fix #56640: Map k8s ansible keys to api keys (#57418)

* Fix #56643: Map ansible keys to api keys

* Remove errant print line

* Fix pep8 issue

* Fix doc line

* Added test for validate_certs -> verify_ssl translation for k8s module

(cherry picked from commit 6e94b472e8)

* Removed proxy from AUTH_ARG_MAP and added fragment for backport

* Rename backport-57418.yaml to 60683-backport-57418.yaml

* Update 60683-backport-57418.yaml
6 years ago
Mitsuru Nakakawaji db9cb0682d fix: docker_swarm_service does not publish both tcp and udp ports (#60616)
* fix: docker_swarm_service does not publish both tcp and udp ports for same published port

* fix the linting problems and add the changelog fragment.

* add test

* modify test to ensure result rather than return value

(cherry picked from commit 064cd63f3d)
6 years ago
Felix Fontein 06623fb79a openssl_certificate: fix idempotency (#60745)
* Fix openssl_certificate idempotency.

* Add changelog.

* Add integration test.

(cherry picked from commit 0d88ec241f)
6 years ago
Sam Doran 0bc1285987 [stable-2.8] fixes issue with recieve parameter idempotency (#59999) (#60541)
* [stable-2.8] fixes issue with recieve parameter idempotency (#59999)

fixes assert statements in unit tests
(cherry picked from commit c9a9621a02)

Co-authored-by: Wojciech Wypior <w.wypior@f5.com>

* Add changelog
6 years ago