Commit Graph

2033 Commits (417e408f596cbf48503f2240b8e2b9a97ed05d51)

Author SHA1 Message Date
Matt Martz 95f0d3ff8d
[stable-2.9] Fix galaxy publish sha256 value format. (#67942) (#69435)
* Fix galaxy publish sha256 value format.

The multipart/form content used for the body
of the POST to /api/automation-hub/v3/collections
was missing a newline before the line with the value
of the sha256.

automation-hub/galaxy/django skips the field entirely in
that case and automation-hub code will use None for default
to indicate that no sha256 is provided (an available option).

Fixes ansible/galaxy-dev#246

* Add changelog fragment

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit cd8dd4a)

Co-authored-by: Adrian Likins <alikins@redhat.com>

Co-authored-by: Adrian Likins <alikins@redhat.com>
5 years ago
Chih-Hsuan Yen 6aca3a2c69
Fix/archive empty file (#64895) (#69420)
* Remove call to filecompare to fix issue with empty file exclusion from archive

* Add empty file

(cherry picked from commit 277dd54d45)

Co-authored-by: Nabil BENDAFI <nbendafi@yseop.com>
5 years ago
Felix Fontein abbb8c4ea8
ansible-test: don't trigger full CI run for changes to changelogs/ and docs/ in collections (#68550) (#69408)
* Don't trigger full CI run for changes to changelogs/ and docs/ in collections.

* Add changelog fragment.

* Update changelogs/fragments/68550-ansible-test-docs-changelogs.yml

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

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit bae5f18f5c)
5 years ago
Felix Fontein 6280bd7af2
Fix ansible-test PATH handling. (#69407)
(cherry picked from commit f1b3e8364e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein b8808efd26
Fix ansible-test module_utils import analysis. (#69406)
Now empty `*.py` files are ignored during module_utils import analysis for change detection.
This eliminates "No imports found" warnings for files which should have no imports.

(cherry picked from commit ab27680318)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein c43b03abe9
Fix shebang sanity test module identification. (#69404)
(cherry picked from commit 9d0113be5c)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein 380be7581e
Address compat issue for collection loading on py26 (#68219) (#69402)
* Address compat issue for collection loading on py26

* Move import_module shim to utils for compat across the codebase

* Enable collection tests on py2.6

* Update changelog fragment

* Simplify code using sys.moduls

* Move compat to module_utils/compat/importlib

* Add back errantly deleted newline

* Remove hack comment

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

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

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Chih-Hsuan Yen c57ca3fbf2
enables to set keys not present in existing config (#69399)
((cherry picked from commit 95525030e2)

Co-authored-by: satunnainen <satunnainen@users.noreply.github.com>
5 years ago
Tadej Borovšak 4670c3bab8
Instruct collection build command to ignore .git file (#69271)
In some advanced git usage scenarios, .git is not a directory. One
such example when developer use worktrees where each worktree contains
a .git symlink to the real .git directory.
5 years ago
Martin Nečas 3e1d4cb6d7
Backport: ovirt_storage_vm_info fix example (#69940)
* ovirt_storage_vm_info: fix example

* add changelog
5 years ago
Martin Nečas ce9493fdb5
Backport: ovirt_vm fix quotas example (#69942)
* ovirt_vm: fix quotas example

* add changelog
5 years ago
Martin Nečas b665a65fea
ovirt: update operating system options backport (#69449)
* ovirt: update operating system options backport

* add changelog
5 years ago
Matt Davis 05aed52d8e
fix get_data on case_insensitive fs (#69955)
* fix get_data on case_insensitive fs

* implement case-sensitive-forcing versions of various os.path methods that just pass through on case-sensitive systems.

* catch broader IOError for py2/py3 compat

* optimization: factor out case-insensitive comparison

* implement case-sensitive open
5 years ago
Felix Fontein 55eb2766ae
[2.9] ansible-test: make pylint deprecation plugin not choke on tagged versions (#69851)
* ansible-test pylint: do not choke on module.deprecate() / display.deprecated() version which has string components.

* Add changelog fragment.
5 years ago
Rick Elrod 6f83b9aff4 New release v2.9.9 5 years ago
Mark Goddard 5a0d35646d Fix fileglob plugin with non-existent subdirectory
Since Ansible 2.9.8, if the fileglob plugin is passed a path containing
a subdirectory of a non-existent directory, it will fail. For example:

lookup('fileglob', '/'): ok
lookup('fileglob', '/foo'): (non-existent): ok
lookup('fileglob', '/foo/bar'): (non-existent): FAIL

The exact error depends on Python 2 or 3, but here is the error on
Python 2:

    AttributeError: 'NoneType' object has no attribute 'endswith'

And on Python 3:

    TypeError: expected str, bytes or os.PathLike object, not NoneType

This change fixes the issue by skipping paths that are falsey before
passing them to os.path.join().

Fixes: #69450
5 years ago
Matt Clay ed2a39d68e New release v2.9.8 5 years ago
Brian Coca 972e55327c [stable-2.9] added missing clog for 58461
(cherry picked from commit 96f504cd11)

Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
5 years ago
Jordan Borean 330112a45c Fix win_psmodule and win_psrepository tests 5 years ago
Ganesh Nalawade e40b96ed88
Refactor CLI prompt mode check for network plugins (#63945) (#69210)
* Refactor CLI prompt mode check for network plugins (#63945)

* Refactor CLI prompt mode check for network plugins

*  Move the CLI prompt mode check logic from action plugin
   to the controller side with the cliconf plugins.

*  This refactor also allows the network modules
   to initialise the persistent connection with remote device
   only when it is required.

* Fix review comments

(cherry picked from commit c27e47327f)

* Fix cli context check for network_cli connection (#64697)

* Fix cli context check for network_cli connection

Fixes #64575

*  Check cli context for network_cli connection
   at the start of new task run only.

* Pass task_uuid around to identify start of new task run

* Handle for local connection

(cherry picked from commit ee3f8d28a4)

* Add test for reboot & wait_for_connection on EOS & IOS (#63014)

* Add test for reboot & wait_for_connection

* Add test for ios

* Collection-proof block test

* Add junos test

* Don't try to evaluate cli context unless using the connection

* Prevent infinite recursion

* Update change log

(cherry picked from commit e19b94f43b)
(cherry picked from commit ee3f8d28a4)
(cherry picked from commit e19b94f43b)

devel:
https://github.com/ansible/ansible/pull/63945
https://github.com/ansible/ansible/pull/64697
https://github.com/ansible/ansible/pull/63014

Co-authored-by: Nathaniel Case <ncase@redhat.com>
5 years ago
Chih-Hsuan Yen fbf93db4a8 [2.9] service_facts: fix for systemd 245
* service_facts: fix for systemd 245

Since systemd 245, `systemctl list-unit-files` comes with a new column
"VENDOR PRESET" [1] and breaks the service_facts module:

This patch drops the third column to make it work with old and new
systemd. With the new slice operation, IndexError instead of ValueError
is raised if the output contains less than 2 columns.

Test plan: running `ansible-test integration -v service_facts` on
up-to-date Arch Linux

[1] https://github.com/systemd/systemd/pull/14445

* add changelog

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit bd4fdb1ca2)
5 years ago
Dusan Matejka 28cc8e6155
[2.9] zabbix_template: fixed zabbix no longer returning macros as part of the template (#69235)
* fixed zabbix no longer returning macros as part of the template (#66996)


(cherry picked from commit c80d0c40ce)

* added changelog fragment
5 years ago
Matt Martz 99e6f4ff54 [stable-2.9] Handle non-ascii paths during role installation. Fixes #69133 (#69213)
(cherry picked from commit bc41dd4)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Matt Martz 6c2b372d1b [stable-2.9] Address fixme and handle filter/test errors for collections better (#68047)
* Address fixme and handle fitler/test errors for collections better. Fixes #66721

* Re-arrange code
(cherry picked from commit ee6413a)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Chris Holland ff3275f9bd [2.9] Added missing parameter
The call to daemonize() in sysvinit.py was missing the module parameter
included in the function definition in service.py.

This pull request simply adds that parameter, as the module is
used for error handling in daemonize().

(cherry picked from commit 339c442250)
5 years ago
Andre Lehmann 0ec98cffe2 hostname - Add Manjaro Linux distribution (#64810)
* Add Manjaro Linux distribution

(cherry picked from commit a75a79b84c)
5 years ago
Jesse Pretorius (odyssey4me) 82378406ea [pip] Enable virtualenv_command to have arguments
Currently if virtualenv_command has arguments, then the
search for the binary in the path does not work so the
user has to specify the full path to it.

To allow arguments to be used without having to specify
the path to the binary, we split the module argument into
the command and anything after the first space.

This makes using this module argument more flexible and
user friendly.

Fixes: #52275
(cherry picked from commit da390b297e)
5 years ago
rwagnergit 081ce0e4e1 update ActionBase._low_level_execute_command to honor executable (#68315)
* update ActionBase._low_level_execute_command to honor executable

* adding changelog fragment

* renaming changelog fragment to .yml

* noop change to bump shippable

* adding raw_executable integration test

* copying aliases from raw

* removing blank lines

* skipping aix and freebsd

* noop to bump shippable

* moving tests to raw/

* removing become_method: sudo ; it doesn't work on AIX

* removing trailing blank line

* forcing become_method: su to try to get AIX to work

Co-authored-by: Rob Wagner <rob.wagner@sas.com>
(cherry picked from commit 977b58740b)
5 years ago
Martin Nečas f252494ff2
ovirt_network: allow to remove vlan_tag (#69123)
* ovirt_network: allow to remove vlan_tag

* add changelog

* fix backport

* fix changelog
5 years ago
Martin Nečas ec73968b5d
ovirt_disk: upload image auto detect size (#69150)
* ovirt_disk: upload image autodetect size

* add changelog
5 years ago
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
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
Jacob Yundt e5d93a4f11 redfish_config: fix support for boolean BIOS attributes
Backport of ansible-collections/community.general#189 to stable-2.9

Currently the redfish_config module will convert boolean bios_attribute_value
settings to strings (type str). This will cause BMCs expecting booleans to
error out.

This PR will change the default type of bios_attribute_value to 'raw' in order
to support strings and booleans.

Fixes #68251
5 years ago
Andrew Klychkov 604f797f0e mysql_user: fix error No database selected 5 years ago
Abhijeet Kasurde 3fd73750dc [2.9] Docs: point inventory script to respective version
With collections migration, inventory scripts are moved from devel (2.10).
Point docs for inventory script to their respective version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde fd828672a5
[2.9] constructed inventory plugin: correct example (#69189)
Fixed 'intersect' filter name in constructed inventory plugin example.

(cherry picked from commit 91d02e1c1f)

Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.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 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
Daniel Mellado a4f13acd85 Revert "Fix missing persistent connection messages (#68496)" (#69147)
This reverts commit 5f6427b1fc.
as it breaks netconf connection. This will be a temporary measure
for unlocking CI until a proper fix is shipped.

Fixes #69065

(cherry picked from commit 9217aeeac1)
Signed-off-by: Daniel Mellado <dmellado@redhat.com>
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 18f91bbb88 Fix incorrect CVE reference in changelog fragment
Change:
This corrects an incorrect CVE identifier in the changelog entry for
CVE-2020-1735.

Test Plan:
N/A

Tickets:
Refs #67793, #68720

Signed-off-by: Rick Elrod <rick@elrod.me>
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
Matt Clay ff7bbbcaf1 New release v2.9.7 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
Brian Coca 685a4b6d3f safely use vault to edit secrets (#68644)
* when possible, use filedescriptors from mkstemp to avoid race
  * when using path strings, ensure we are always creating the file

CVE-2020-1740
Fixes #67798

Co-authored-by: samdoran
(cherry picked from commit 28f9fbdb5e)
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
Dmitriy Rabotyagov 65866519e4
support rabbitmq 3.8.x in version check (#66855) (#68137)
* support rabbitmq 3.8.x in version check (#66855)

* support rabbitmq 3.8.x in version check

* Removed extraneous white space

(cherry picked from commit 6b017db05b)

* Add changelog fragment.

Co-authored-by: bitchkat <kjh@flyballdogs.com>
Co-authored-by: Matt Clay <matt@mystile.com>
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
Jordan Borean cef6296735 WebRequest - Fix use_proxy: no on module options (#68603)
* WebRequest - Fix use_proxy: no on module options

* Fix up changelog fragment

(cherry picked from commit ae1cd27b57)
5 years ago
Florian Apolloner 3bebeb9cc3 Fixed mysql_user module idempotency for long privilege lists. (Fixes #68044) 5 years ago
Abhijeet Kasurde 8d387802ec [2.9] ipa: Remove redundant encoding in json.loads
Backport of https://github.com/ansible-collections/community.general/pull/87

Fixes: ansible/ansible#66592

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein 2b536b8e82 Backport of ansible-collections/community.general@07e8911fd8 to stable-2.9. 5 years ago
Nathaniel Case a41f09901b
[stable-2.9] Fix missing persistent connection messages (#68496) (#68562)
* [stable-2.9] Fix missing persistent connection messages (#68496)

* Be more proactive about returning module messages

* Move message display to a function, and replace handling already in shutdown().
(cherry picked from commit 5f6427b1fc)

Co-authored-by: Nathaniel Case <ncase@redhat.com>

* Add changelog
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
Martin Nečas 61c6a6b7b3
ovirt_storage_domain: fix update_check warning_low_space (#68505)
* ovirt_storage_domain: fix update_check warning_low_space

* add changelog
5 years ago
Jordan Borean b0e2321a17 setup - Use original logic for FQDN hostname builder 5 years ago
Simon Dodsley 281af782e2 Fix purefa_snmp errors 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
Brian Coca 52d509717e fallback to uid when no uname (#68466)
* fallback to uid when no uname

 fixes #68007

Co-Authored-By: Matt Clay <matt@mystile.com>
(cherry picked from commit 1570098e86)
5 years ago
Abhijeet Kasurde 8088ffb853 [2.9] Fix warning message in dense callback plugin
Fix dense callback plugin access to its configuration variables
and remove a warning message

Backport of https://github.com/ansible-collections/community.general/pull/83

Fixes: #64628
5 years ago
Matt Martz 76f1aeb188 [stable-2.9] Always set the discovered interpreter on the delegated host (#64906)
* Always set the discovered interpreter on the delegated host. Fixes #63180

* Make code a little more generic

* Move code into a function

* Implement some changes based on reviews

* Add changelog fragment
(cherry picked from commit 123c624)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
gp 859cdc8695 [2.9] VMware: Fix cluster argument of module vmware_content_deploy_template
(cherry picked from commit 98f19c970f)

Signed-off-by: gp <gp@gparent.net>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde 64d8947f7f [2.9] docs: Fixed "Edit on GitHub" link for plugin, cli
Fixed sphinx theme to navigate "Edit on Github" link to locate correct
plugin, cli source in GitHub repo.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 2728c2476e)
5 years ago
Brian Coca 80b9a0a25c avoid mkdir -p (#68921)
* also consolidated temp dir name generation, added pid for more 'uniqness'
* generalize error message
* added notes about remote expansion

CVE-2020-1733
fixes #67791

(cherry picked from commit 8077d8e401)
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
Abhijeet Kasurde 9f22ef10b6 [2.9] Handle get_tags_for_object in vmware_rest_client
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
yatinkarel a0491f804f Fix os_user_role issue to grant a role in a domain
Fixes #66525.

Backport of https://github.com/openstack/ansible-collections-openstack/commit/4c03ae.
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
Nathaniel Case f75e1698f5
[stable-2.9] Optionally support task_uuid if passed from newer modules (#68556)
* Optionally support task_uuid if passed from newer modules

* Add changelog
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 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
Mario Lenz 4433899b79
[2.9] vmware_cluster: Improve documentation for deprecated parameters (#68175)
* vmware_cluster: Improve documentation for deprecated parameters, with changelog fragment
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
Matt Clay 9e3ccd64b6 New release v2.9.6 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
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
Nilashish Chakraborty 7051a7ff92
Fix eos_vlans docs (#67335)
wording in examples changed ios to eos (#66131)

wrong module was used in examples: should be eos_vlans not ios_vlans

(cherry picked from commit 506e2da0ff)

Add changelog for eos_vlans docs fix

Co-authored-by: qoreQyaS <github@gucke.net>
5 years ago
Sumit Jaiswal ed30858f50
Backport PR to fix the bug where IOS vlans module throws traceback (#67336)
* To fix the bug where IOS vlans module throws traceback (#64633)

* fix 64515

* add fix

(cherry picked from commit c5a2ba5217)

* changelog
5 years ago
Mario Lenz 49cb05d992
Fix creating IP specific firewall rules with Python 2 (#67394) 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
Markus Bergholz 3d91f759c0
Backport/2.9/57737 ec2_asg unhandled exception (#67431)
* cope with an ASG instance not having a launch config any more (#57737)

* add changelog

Co-authored-by: Andrew de Quincey <adq@lidskialf.net>
5 years ago
Christian Köberl 1b65ecc71a
azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729) (#67479)
* azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729)

* azure_rm_rg_info: fix KeyError: 'ansible_facts'

Fix facts for using old azure_rm_resourcegroup_facts, closes #66727

* fix intendation

(cherry picked from commit 569f0cf808)

* azure_rm_rg_info: add changelog fragment
5 years ago
Martin Krizek 587f241dbf
Remove a host from a play after meta: end_host (#66851) (#67480)
* Remove a host from a play after meta: end_host

* Fix changelog

(cherry picked from commit a2c620819f)
5 years ago
René Moser ee9c5df0f0
vultr: Fix retry max delay param ignored (#67437) (#67513)
* vultr: Fix retry max delay param not taken

* add changelog

(cherry picked from commit bcd145c111)
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
Felix Fontein e64b120bff
openssl_* modules: prevent crash on fingerprint determination in FIPS mode (#67515) (#67519)
* openssl_* modules: prevent crash on fingerprint determination in FIPS mode.

* Add changelog.

(cherry picked from commit ca57871954)
5 years ago
Abhijeet Kasurde e40e05576b
[2.9] Fix links in Postgresql modules (#67525)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 70b9bdbce6)
5 years ago
Martin Nečas 9351cbfde3
Fixi iscsi register backport (#67542)
* Fix KeyError for iSCSI parameters (#67463)

The required parameters for the LUN mapping for destination LUN is
address, port and iqn. However if the user doesn't pass parameters
like  CHAP authentication parameters, we will get KeyError. The patch
fixes the same.

* add changelog

Co-authored-by: Nijin Ashok <nashok@redhat.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
Martin Nečas ad4cad43ad
Ovirt vm numa backport (#67700)
* ovirt_vm: correct numa nodes (#67611)

* init commit

* update docs

* update numa function name

* correct whitespaces

* add backport
5 years ago
Sam Doran a0c3d890c3
[stable-2.9] Allow SSH synchronization between Docker containers (#65698) (#67713)
* [stable-2.9] Allow SSH synchronization between Docker containers
(cherry picked from commit 1c15a485c2)

Co-authored-by: Nabil BENDAFI <nabil@bendafi.fr>

* Add changelog

(cherry picked from commit 854925b072)

Co-authored-by: Nabil BENDAFI <nabilbendafi@users.noreply.github.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
akatch c3dbd69a1b
[Backport/2.9/66098]: Fix duplicate log entries (#67719)
* Fix duplicate log entries (and add item support for failures) (#66098)


(cherry picked from commit 936bd83614)

* Backport + changelog for #66098
5 years ago
Abhijeet Kasurde 449626feb5
[2.9] hostname: Use hostnamectl for Systemd strategy (#67721)
Use hostnamectl command to get current hostname for host while using
systemd strategy.

Fixes: #67661

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 53aa258d78)
5 years ago
Brian Coca 9c17410f58
strip spaces for each value in host list lists (#67701) (#67740)
(cherry picked from commit 9ea5bb3364)
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 e379dc76c3
Run Powershell modules on windows container via docker connection (#67832) (#67872)
* Run modules on windows container

This provides an ability to run Powershell modules on windows container via docker connection. Otherwise, Ansible tries to run python modules on windows containers and fails.

* Removing whitespace in the blank lines

* Adding a changelog fragment

(cherry picked from commit e0eee3c37e)

Co-authored-by: Ruheena Ansari <ruheena0105@tamu.edu>
5 years ago
Felix Fontein ff3d3b59e2
Remove redundant check for pyopenssl (#67901) (#67903)
(cherry picked from commit 44d8ce9b31)

Co-authored-by: gp <gp+github@gparent.net>
5 years ago
Martin Nečas 6e7383807a
Ovirt vm deprecated backport (#67923)
* ovirt_vm: remove deprecated warning (#67922)

* ovirt_vm: remove deprecated warning of boot params

* update docs

* add changelog
5 years ago
Jesse Pretorius (odyssey4me) 1e8bebb20b Bump min openstacksdk version for os_network/{port_security_enabled,mtu}
To make use of the port_security_enabled [a] and mtu [b] parameters,
[c] and [d] need to be present in the openstacksdk or the os_network
module with return an error like:

TypeError: create_network() got an unexpected keyword argument 'port_security_enabled'

or:

TypeError: create_network() got an unexpected keyword argument 'mtu'

To handle this, we fail the module if one of the arguments are used
and the minimum openstacksdk version for that argument is not met.

[a] eaf238b033
[b] c6a8e99d34
[c] 8eb788af07
[d] a1fc820a2f

Backport-of: https://review.opendev.org/708119
Fixes: https://github.com/ansible/ansible/issues/62062
Change-Id: I2b80dc721a08bbdb530af3705ae99cf1b579d9f0
5 years ago
Andrew Klychkov f90c7411e8 Bugfix of 65351: mysql_db create dump with CREATE DATABASE and USE instruction 5 years ago
Bruno Meneguello cddecf8c05
Backport/2.9/60508 (#67531)
* route53: improve octal encoded characters handling

* Update changelogs/fragments/60508-route53-improve-octal-characters-handling.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Felix Fontein a24dcf232c docker_login: fix permissions for ~/.docker/config.json (#67353)
* Fix permissions for ~/.docker/config.json.

* Add changelog, remove debug output.

(cherry picked from commit 55cb8c5388)
5 years ago
Matt Martz 6fc2ae7476 [stable-2.9] Clean up CONDITIONAL_BARE_VARS warning. Fixes #67735 (#67751).
(cherry picked from commit 6e1a59174a)

Co-authored-by: Matt Martz <matt@sivel.net>
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
Felix Fontein b38603c45e Templating: make sure only one variable results are cached (#67429)
* Make sure only one variable results are cached.

* Add changelog.

* Add test.

(cherry picked from commit c520d70bf4)
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
Ganesh Nalawade 7cac554222 Add collection support for network platform agnostic modules (#66342)
*  Refactor net_base action plugin to invoke platform
   action plugin with implementation module name updated
   in the new task copy.

(cherry picked from commit 0d85ab1fe3)
5 years ago
Max Bubenick eb01926b43
Backport PR #67339 - Fix proxysql module cursor_class (#67471)
* Fix merge conflicts

* remove db_conn  as mysql_utils was not backported from devel

* fix indentation for sanity check
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
Martin Nečas e047c8c70e
ovirt_disk: correct description of storage_domain (#67454) (#67518)
* ovirt_disk: correct description of storage_domain
* add changelog

Signed-off-by: mnecas <necas.marty@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay 9388be4269 New release v2.9.5 5 years ago
Martin Nečas b49d1d9810
Backport ovirt disk docs (#67301)
* ovirt_disk: update interface docs (#67272)
* add changelog
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
Matt Davis 1dafd80eab
fix changelog entry failing rstcheck 5 years ago
Nilashish Chakraborty 54ca524da3
nxos_interfaces: RMB state fixes (#63960) (#67173)
* nxos_interfaces: RMB state fixes

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix

(cherry picked from commit d72025be75)

Add changelog for nxos_interfaces fix

Co-authored-by: Chris Van Heuveln <cvanheuv@cisco.com>
5 years ago
James Cassell c956f9cffe
fix systemd use in container builds (#66062) (#67140)
* systemd: unify "systemctl show" failure cases

* systemd: is-enabled to detect configured state

* systemd: is-enabled to detect masked status

(cherry picked from commit b868f1c933)
5 years ago
James Cassell aa64519072
wait_for_connection: also retry interpreter discovery (#67040) (#67136)
self._discovered_interpreter_key is None unless a previous iteration
has attempted discovery.  In that case, force re-discovery, as the
previous attempt certainly failed.

(cherry picked from commit fd954a9c5c)
5 years ago
Felix Fontein 569218f0cd
Fix removed_in_version to support honor suboptions (#66918) (#67104)
* Add unit tests.
* Fix reporting for removed_in_version.
* Add changelog.

(cherry picked from commit fe454d27a1)
5 years ago
Brian Scholer f330286734
[Backport/2.9/66604] Fix powershell path_join for UNC path handling (#67073)
* Update to use os.ntpath

(cherry picked from commit 1522820612)

* Add changelog for #66604

(cherry picked from commit 40761c73b6)
5 years ago
Felix Fontein 42cae0a801
openssl_publickey: forgot to pass backend (#67036) (#67039)
* Forgot to pass backend.

* Add changelog.

* Pass on backend from get_fingerprint.

* Handle cryptography backend in get_fingerprint.

(cherry picked from commit a0e5e2e4c5)
5 years ago
Andrew Klychkov 5ca28963e5
Backport of 66806: mysql_variables not supporting variables name with dot (#67007) 5 years ago
Simon Dodsley 287ea7d319
Fix user_agent string not getting set (#67001)
(cherry picked from commit cb9e24fbd2)
5 years ago
Andrew Klychkov c529c86c1e
Backport of 66995: mysql_user doesnt support privileges with underscore (#66998) 5 years ago
Jesse Pretorius 5d406cffca
Bump minimum openstacksdk version when using os_network/dns_domain (#66952)
With the addition of [a], the minimum openstacksdk version needs to
be bumped to include [b], or the os_network module will return the
error:

TypeError: create_network() got an unexpected keyword argument 'dns_domain'

To handle this, we fail the module if the dns_domain argument is used
and the minimum openstacksdk version for that argument is not met.

[a] 6c74e29618
[b] a3e846e2b9

Fixes: #64495
Fixes: #64841
5 years ago
Nathaniel Case 31e348409f
[stable-2.9] nxos_facts: Don't fail if faninfo isn't reported (#66866) (#66949)
(cherry picked from commit bf65e7a)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
5 years ago
Jiri Hnidek 69ba90098a
When no pool quantity is set, then do not set quantity to 1 (#66807) (#66933)
* Fixes #66478
* When no quantity is set, then candlepin server usually uses
  default value 1. When more quantities are required, then
  candlepin server can automatically choose correct minimal
  value.

(cherry picked from commit 6f1bb37feb)
5 years ago
Sumit Jaiswal f54263c459
Backport/2.9/55220 (#66757)
* Working Cisco IOS macro editing (fixes #55211) (#55220)

* Working Cisco IOS macro editing (fixes #55211)

* Working Cisco IOS macro editing [fixed pylints] (fixes #55211)

* Added integration tests for edit_macro

* Added conditional integration tests for ios_config macro

* Cosmetic fix: when near block for added conditional integration tests for ios_config macro

* Move teardown to always for block

(cherry picked from commit 4a0c875447)

* changelog

Co-authored-by: Albert Siersema <albert@mediacaster.nl>
5 years ago
René Moser 77985f2beb
galaxy: fix AttributeError on empty requirements.yml (#66726) (#66752)
* galaxy: fix AttributeError on empty requirements.yml

* add changelog

(cherry picked from commit 9e8fb5b7f5)
5 years ago
Sumit Jaiswal f8c4a38ffe
Backport PR to fix the duplication of IPV6 address with replace state in ios_l3_interfaces module (#66680)
* fix 66530 (#66654)


(cherry picked from commit 0c4f167b82)

* changelog

* Update 66654-fix-ipv6-duplication-for-replace-state-ios-l3-interfaces.yaml

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Ruediger Pluem 481327ec37
group - correctly determine if a local group exists. (#59772) (#67176)
Fixes #58619
Add integration test

(cherry picked from commit 80c4b86abe)
5 years ago
Florian Apolloner 361d7c677f
Fix DNF idempotency. (#66209) (#66578)
(cherry picked from commit a7e4479d01)
5 years ago
Abhijeet Kasurde 99c96bbf42
[2.9] gitlab_project_variable: Remove sensitive information (#66559)
Redact GitLab Project variables which might include sensetive information
such as password, api_keys and other project related details.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 84b68aa05f)
5 years ago
Peng Xiao 6f0f2c9d68
[stable-2.9]add one note to help ansible user to understand the requirements to (#65969) (#66493)
execute iosxr_command module

Signed-off-by: Peng Xiao <xiaoquwl@gmail.com>
(cherry picked from commit 69f9c3c8eb)
5 years ago
Mark Chappell 57fbb0e571
Backports/2.9/67188 aws_az_info: Fix rename deprecaction warning (#67208)
* aws_az_info: Fix rename deprecaction warning (#67188)

* Add changelog
5 years ago
kaorihinata a9c3bfa96c
Backport PR #66219 to support the backport of PR #64733 (#67209)
* Update user module to support no_log=False. (#66219)

Updates the user module to support pull request #64733. Neither the
update_password or password_lock field contains sensitive information, so
mark them as such.

(cherry picked from commit 40394ed671)

* Backport PR #66219 to support PR #64733

Backport PR #66219 to support the backport of PR #64733
(see: https://github.com/ansible/ansible/pull/66219).

* Delete backport-66219-update-user-module-for-64733.yml

* Update 66219-update-user-module-for-64733.yml

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Allen Smith 7ace25dd6d
Backport of pmrun.py: Recreate the older behavior where the entire success command was quoted (#67241)
* pmrun - quote success command (#66929)

* Recreate the older behavior where the entire success command was quoted

* Use shlex_quote for a correct fix of this

* Add changelog fragment

(cherry picked from commit fd8eb77cc3)

* Backport of 66929-pmrun-quote-entire-success-command-string

* Update changelog fragment

* Delete 66929-pmrun-quote-entire-success-command-string.yml

Unclear from docs, but this is the devel fragment so removing.

* Update changelog
5 years ago
GomathiselviS 182831d8b0
Make banner detection non-greedy in ios_banner (#63092) (#66274)
* Make banner detection non-greedy in ios_banner (#63092)

* Make banner detection non-greedy in ios_banner

* Added ios_banner unit test to detect bug #63091

* Corrected PEP8 errors

* Added integration test

* Corrected typo in integration test

(cherry picked from commit 01a92f0191)

* Added changelog fragment

* Update 66274-ios_banner_nongreedy.yml

Co-authored-by: kalimsshar <34369784+kalimsshar@users.noreply.github.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Martin Nečas 93e66c1362
Backport ovirt job (#67076)
* ovirt_job: add when job is detected but in state finished (#66810)

* ovirt_job: add when job is detected but in state finished

* add docs

* add changelog
5 years ago
Felix Fontein b9a2466e76
docker_container and docker_swarm_service: allow to actually disable healthcheck of image (#66599) (#67056)
* Allow to actually disable healthcheck of image.

* Add changelog.

(cherry picked from commit 5c1a3a3ac2)
5 years ago
Felix Fontein e42c007753
Fix pacman: "IndexError: list index out of range" #63077 (#65750) (#67011)
* Fix #63077

If the package is already installed the stdout is not as expected by this function. Either remove `--needed` or just noop if we detect pacman returning. We cannot match the stdout string, as that is most likely localized.

```
[root@archBook user]# /usr/bin/pacman --upgrade --noconfirm --noprogressbar --needed  /srv/aur/src/i3cat-git/i3cat-git-r38.c6d29dd-1-x86_64.pkg.tar.xz
loading packages...
warning: i3cat-git-r38.c6d29dd-1 is up to date -- skipping
 there is nothing to do
```

* Add comment

Add comment

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 14b1febf64)

Co-authored-by: Klaus Frank <agowa338@users.noreply.github.com>
5 years ago
Sam Doran a2b5af86dd
[stable-2.9] include_vars - fix stack trace when run ad-hoc with dirs parameter (#66581) (#66910)
Add integration test

There are a number of other parameters that result in stack traces as well when this module is used ad-hoc. I'm not sure if we're interested in fixing them all since this module isn't meant to be run ad-hoc.
(cherry picked from commit cc2376b782)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Martin Nečas becf3fbf97
Ovirt add search with space (#66890)
* ovirt search name with space (#59184)

* init ovirt_search_name_with_space

* add search_by_name with whitespace

* add comments

* add changelog
5 years ago
Martin Nečas 587ed81d16
Backport ovirt network correct (#66886)
* ovirt_network: correct when not specified external_provider (#66859)

* add backport
5 years ago
Pilou 783daf9d1b
throttle: fix linear based strategies (#65422) (#66805)
* throttle tests: fix detection of parallel execution

The test wasn't able to detect if too many workers were running.

On my laptop:
- without this change, the 'throttle' target takes ~20 seconds
- with this change, the 'throttle' target takes ~70 seconds
- 1 second isn't long enough to encounter the issue

* Fix throttle test when strategy is 'free' based

'free' strategy allows multiple tasks to be executed in parallel: use
one 'throttledir' per task.

Use 'linear' strategy with a dedicated play for cleanup/setup tasks

* throttle: reset worker idx before queuing a new task

* TestStrategyBase: define task.throttle

otherwise '1' will be used instead of the default value due to the
following expression being equal to '1':

    int(templar.template(task_mock.throttle))

Co-authored-by: James Cammarata <jimi@sngx.net>
(cherry picked from commit bbbdc1c25c)
5 years ago
Sato Kenta 6df09ae41e
pamd: Fix AttributeError when removing the first or last rule (#66398) (#66776)
(cherry picked from commit a4b59d0213)
5 years ago
Nilashish Chakraborty 474e6b1094
Backport 2.9: nxos_telemetry - Fix fact gathering for sensor-groups (#66677)
* Fix fact gathering for sensor-groups (#66439)

(cherry picked from commit 5c158755fc)

Add changelog for nxos_telemetry fix

* Update 66439_fix_nxos_telemetry_facts.yaml

Co-authored-by: Mike Wiebe <mwiebe@cisco.com>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Mariusz Kryński 0952dad9e2
[stable-2.9] jenkins_job module: fix for python3 (#66642)
* jenkins_job module: fix for python3 (#54958)

* jenkins_job module: add changelog fragment
5 years ago
Sam Doran 13023455e1
[stable-2.9] display - remove extra new line after warning message (#65199) (#66768)
Add unit tests for display
(cherry picked from commit 8e195adda5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 3245b3dff2
[stable-2.9] synchronize - fix password authentication (#66542) (#66661)
On Python 2, leave all fds open since there is no mechanism to close specific fds with subprocess.Popen() on Python 2

Add unit tests.

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 617fbad743)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 6120cd18e2
[stable-2.9] podman - fix rootless container copy no pause (#66583) (#66588)
Fixes #66263

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 077a8b4898)

Co-authored-by: Adam Miller <admiller@redhat.com>

Co-authored-by: Adam Miller <admiller@redhat.com>
5 years ago
Sam Doran c4f1e04bef
[stable-2.9] file - change _diff_peek type in argument_spec (#60428) (#66587)
* Add integration tests
* Handle error in _get_diff_data()
* Change to warning rather than error
* Also change failure to warning in assemble action plugin
(cherry picked from commit 9b7198d25e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Jordan Borean 3284262a60
Use UTF-8 without a BOM for win coverage (#66510) (#66513)
(cherry picked from commit e459eac565)
5 years ago
Martin Nečas a8657de818
Ovirt add docs ova backport (#66653)
* ovirt_vm: add docs about importing ova (#66652)

Signed-off-by: mnecas <necas.marty@gmail.com>
5 years ago
Matt Clay a8b71747ae [stable-2.9] 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 Davis 818c66163e New release v2.9.4 5 years ago
Sam Doran e283c180d1 [stable-2.9] yum - fix bug where enablerepo is not honored when disablerepo all (#66557) (#66640)
Fixes #66549

The inefficiency improvement
https://github.com/ansible/ansible/pull/63713 introduced a bug where
`enablerepo` was not being honored if combined with
`disablerepo="*"`. This fixes that issue.

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 22fe22f796)

Co-authored-by: Adam Miller <admiller@redhat.com>

Co-authored-by: Adam Miller <admiller@redhat.com>
5 years ago
Matt Davis 6832d8bf6a New release v2.9.3 5 years ago
Matt Clay a951e007df [stable-2.9] Ignore warnings in ansible-test environment check.
(cherry picked from commit 3db1ac4f56)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 41ec9a8516 [stable-2.9] 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
Rémi REY d97a9a75bd Fix callback set_options issue with collections (#66128)
Fixes: #66127
(cherry picked from commit 7888eafb82)
5 years ago
Ganesh Nalawade 5dc1d93eac Fix iosxr netconf plugin get device info (#65489)
* Fix iosxr netconf plugin get device info

Fixes https://github.com/ansible/ansible/issues/64634

*  Catch execption if the xml payload to get
   device info is not valid for iosxr version
   running on remote host.

* Fix CI issue

(cherry picked from commit 3919a891c2)
5 years ago
Ganesh Nalawade 2d7819e75d Fix netconf plugin related to collections (#65718)
* Fix netconf plugin related to collections

Fixes #65655 (partly)

*  Make netconf plugins configurable so that the
   information of ncclient device handler
   for give platform resides in the platform
   specific netconf plugin.
*  If the device handler value in ncclient is
   different from the ansible_network_os value
   the right value of `ncclient_device_handler`
   should be set in the plugin documentation.

* Fix review comments

* Fix CI issue

* Fix review comment

(cherry picked from commit 1cfab26fab)
5 years ago
Trishna Guha 7769cc82d3 fix nxos_hsrp keyerror (#65796)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit cb2a45d286)

Add changelog for nxos_hsrp fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Mike Wiebe 247c73432e Fix nxos_user roles bug (#65962)
(cherry picked from commit c2fed8603c)

Add changelog for nxos_user roles fix
5 years ago
Chris Van Heuveln 4f3dd5a043 nxos_vlans: fix rmb behaviors and tests (#63650)
* nxos_vlans: fix rmb behaviors and tests

* whitespace fixes

* whitespace fixes 2

* review comments addressed

* TBD for legacy support

* additional tests to hit code coverage misses

* whitespace

(cherry picked from commit 3252665a94)

Add changelog for nxos_vlans fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 54e0b2aa30 Make autocost bandwidth calculation a floor division for Py3 compatibility (#66095)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 06927eab1f)

Add changelog for nxos_ospf_vrf fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 0d3c5c4bac Fix nxos_snmp_community command ordering (#66094)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 4674435367)

Add changelog for nxos_snmp_community fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 4a034fdf4e Fix rendering duplicate peer-ip commands (#66088)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 0ebb0ac0fa)

Add changelog for nxos_vxlan_vtep_vni fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty 53847bd529 Fix nxos_l3_interfaces rendering of dhcp (#66049)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 94e054755f)

Add changelog for nxos_l3_interfaces fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Nilashish Chakraborty eab972a70e Fix defaulting neighbor password
Add debug (#65909)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit ae0df67539)

Add changelog for nxos_bgp_neighbor fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
GomathiselviS 4de0d4648d Fix nxos_vrf purge breaking with empty aggregate
Fix to nxos_vrf purge breaks with empty aggregate (#66004)

* resolving conflicts

* fixed issue with purge and state var. fixed space issue with vrf name

* lint issues

(cherry picked from commit a3d67edfca)

Add changelog for nxos_vrf fix
5 years ago
Andrew Klychkov 13031109aa Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2 (#65903)
* Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2

* add changelog

(cherry picked from commit 9b85a51c64)
5 years ago
Ganesh Nalawade e6405715c8 Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

Fixes https://github.com/ansible/ansible/issues/65071

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test

(cherry picked from commit 74e9b1e219)
5 years ago
Andrew Klychkov a45659652d postgresql_schema: use query_params with cursor object (#65679) 5 years ago
Martin Nečas 508ebf295b backport of ovirt_vm template clone check (#65702)
* backport of ovirt_vm template clone check

* update change log

* update change log 2
5 years ago
Lénaïc Huard 73238a5dc0 Fix pacman stdout parsing in the Ansible module (#65238)
pacman output is localized and the Ansible module is parsing its output.
So, we need to force the locale.
Add changelog fragment

Fixes #65237

(cherry picked from commit 10b6038e21)
5 years ago
Martin Nečas dd4e7950fc backport of ovirt_network: correct external provider (#66053)
* ovirt_network: correct external provider (#65701)

* ovirt_network: update external provider

* unnecessary remove blank line

* remove update check for external_provider

* first try to import then create

* add changelog
5 years ago
DaveD cab0d2d759 [2.9] vmware_deploy_ovf: Use correct datastore in multi-datacenter environment
Fixes: #63920

Need to pass the datacenter to assure we get the correct datastore managed object Id.

(cherry picked from commit dc59880c31)
5 years ago
Egor Zaitsev 95b7bc15a0 routeros_command – add support for dot in username (#66293)
* routeros_command – add support for dot in username (#65905)

* chore: changelog
5 years ago
Adam Miller 610487df3c yum - only instantiate YumBase once (#63713)
* yum - only instantiate YumBase once

Previously, this code was re-instantiating the `YumBase` object
many times which is unnecessary and slow. However, we must do it
twice in the `state: absent` case because the `yumSack` and
`rpmSack` data of the previously instantiated object becomes
invalid and is no longer useful post transaction when we verify
that the package removal did in fact take place. Also, this patch
removes the repetitive re-processing of enable/disable of repos in
various places.

Here's a display of the speed increase against a RHEL7 host:

```yaml
- hosts: rhel7
  remote_user: root
  tasks:
  - name: Install generic packages
    yum:
      state: present
      name:
        - iptraf-ng
        - screen
        - erlang
  - name: Remove generic packages
    yum:
      state: absent
      name:
        - iptraf-ng
        - screen
        - erlang
```

Before this patch:
```
real    0m52.728s
user    0m5.645s
sys     0m0.482s
```

After this patch:
```
real    0m17.139s
user    0m3.238s
sys     0m0.277s
```

Fixes #63588
Fixes #63551

Signed-off-by: Adam Miller <admiller@redhat.com>

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
5 years ago
Jill R 13c40c70db Allow updating of ec2_group rules with EC2 classic ELB targets (#62374)
* Allow updating of ec2_group rules with EC2 classic ELB targets

Fix regression introduced in #45296 with EC2 Classic SGs

Fixes: #57247

Also add (unsupported) ec2 classic test suite with test case for this scenario

* move ec2 classic tests to conditional within ec2_group target

* clean up ec2_classic tests

* ec2_classic account can't run most ec2_group tests
5 years ago
Mads Jensen e842c9a151 Use a context manager in docker.ImageManager. (#65609)
Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 965474841f)
5 years ago
Christophe Drevet-Droguet c3cd510770 terraform workspace list failure warns instead of fails (#65044)
* terraform workspace list failure warns instead of fails

Fixes #64788

* add a changelog fragment

(cherry picked from commit b580f2929d)
5 years ago
Adam 06044aa3b8 #58578 support absolute paths additionally (#58812)
* support absolute paths additionally

* add changelog

* rename changelog

* fix changelog to bugfix

(cherry picked from commit e711d01ed1)
5 years ago
Matt Martz 09e89d538c [stable-2.9] Add method to automatically clean up after an action plugin (#65509)
* Use correct var, move cleanup for async
* Add changelog and tests. Fixes #65393. Fixes #65277.
* Kill off all long running async tasks from listen_ports_facts
* Update task to work with older jinja2
(cherry picked from commit 03a4edb)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Sam Doran 56c6ebe258 [stable-2.9] Make sorting in collection_loader match plugin loader (#65776)
* Simply sorting of Windows files below other plugin types
    Using the sort method with a custom key function uses less memory than creating multiple lists then joining them.

    This seemed to be an acceptable use of a lamdba, even though I geneally try to avoid them.

* Fix sorting of plugins inside of collections
    Explicitly sort Windows files below others, mimicking what we do in plugin/loader.py

* Add documentation about ansible.builtin and ansible.legacy
    Also document to the two different methods used for searching based on the candidate type.

* Add changelog
* Add integration test
* Update comment with expected sort order
(cherry picked from commit 6f76a48f59)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Marc Hörsken 67302136bf [stable-2.9] Fix 'CyberarkPassword' object has no attribute 'delimiter' (#66268)
This is a very small follow up to PR #59500
(cherry picked from commit 53e405dd42)

Co-authored-by: Marc Hörsken <mback2k@users.noreply.github.com>
5 years ago
Jordan Borean 44a5b20c67 ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578)
(cherry picked from commit eaba5572cd)
5 years ago