Commit Graph

1872 Commits (4ed4d2d2800adc08a7dba9711acf277768b01ac7)

Author SHA1 Message Date
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
Jordan Borean 57b09d0684 win_uri win_get_url - Fix up redirection defaults (#65584)
(cherry picked from commit 9a81f5c3b7)
5 years ago
Jordan Borean e577e8f30b display - Fix up tracebacks on 3rd party loggers when log path is set (#65582)
(cherry picked from commit b782227642)
5 years ago
Jordan Borean 66f089de4b ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list

(cherry picked from commit aba8f12495)
5 years ago
Jordan Borean ab441a2784 Make sure warnings are printed during fact gathering (#66258)
(cherry picked from commit d3427bb860)
5 years ago
Felix Fontein b55f20a3ee [2.9] various elbv2 bugfixes (#65212)
* Add aws elb multiple host header support (#65021)

* Add support for aws elbv2 multiple host header actions

* Add example of multiple host header

* Add test for multiple host headers

* Add missing quote

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Update test/integration/targets/elb_application_lb/tasks/test_modifying_alb_listeners.yml

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Remove debug statements

(cherry picked from commit d52af75c68)

* elbv2 - print() statement results an task failure, even if the task itself was successfull (#65183)

(cherry picked from commit cba9abcbec)

* Add changelog fragment.

* Update changelogs/fragments/65021-65183-elb-bugs.yml

* Force values to be sorted when compared. (#65315)

* Force values to be sorted when compared.

This avoids problems where lists of values could be generated in
indeterminate order.

* Update lib/ansible/module_utils/aws/elbv2.py

Thank you felixfontein, sorry I missed this detail.

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 777b6d3e30)

* Update changelog.

Co-authored-by: Michael Mayer <mjmayer@gmail.com>
Co-authored-by: Markus Bergholz <markuman@gmail.com>
Co-authored-by: roberbri <roberbri@cisco.com>
5 years ago
Jill R a7bb6700c6 [2.9] ec2 Filter dictionary iteration errors on py3.8 (#65705)
* Fix RuntimeError in ec2_group_info (#65434)

Modifying dictionary while iterating over it

* Fix ec2 filter dict iteration for python3.8 (#65521)

Python now throws a RuntimeError if dict keys are modified mid-iteration.
https://bugs.python.org/issue36452
Cast filter dicts to list before iteration.

Fixes: 65024
Related: 65434

* Backport of 65434, 65521 to address ec2 filter dictionary iteration on Py3.8

https://bugs.python.org/issue36452

* spell changelog entry correctly

Co-authored-by: Aaryn <10469251+arin-c@users.noreply.github.com>
5 years ago
Felix Fontein 3ff86a5cad docker_* modules: fix various errors in argument specs (#65632)
* Fix various errors in docker module argument specs.

* Adjust PR #.

* Fix option name.

* Fix username/password requirements for docker_login.

(cherry picked from commit e9cec0262d)
5 years ago
Ganesh Nalawade 69070402f0 Fix network_cli become check to be compatible with collections (#65829)
*  The become method name check is not required in network_cli
   as the become command is specific to platform and is implemented
   in the platform specific terminal plugins

(cherry picked from commit ff5253fa0e)
5 years ago
Ganesh Nalawade 21fad83716 Fix action plugin issue with network connection type in common collec… (#65830)
* Fix action plugin issue with network connection type in common collection (#65078)

* Fix action plugin isse with network connection type in common collection

*  For network connection in common collection the value of
   ansible_connection is the FQCN of the connection type
   For example ansible_connection=network.common.network_cli

*  Add fix in supported network action plugins to extract
   the connection name from FQCN

* Fix CI issue

* Fix review comments and update community network action plugins

(cherry picked from commit 2ef47148cd)

* Fix CI failures
5 years ago
Nilashish Chakraborty e822ce196c Use dict_diff instead of sets to take diff lag members (#66126)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit cb46e5f06b)

Add nxos_lag_interfaces fix changelog

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Andrew Klychkov 992960cfbb Backport of 65791 - postgresql modules: use query parameters with cursor objects (#65864)
* Backport of 65791 - postgresql modules: use query parameters with cursor objects

* remove line from changelog fragment
5 years ago
Felix Fontein d1ac4da6a1 crypto modules: fix various errors in argument specs (#65633)
* Fix various errors in crypto module argument specs.

* Adjust PR #.

* Fix provider requirement.

* Make sure openssl binary is installed.

(cherry picked from commit 57c042243f)
5 years ago
Andrew Klychkov d706059006 Backport of 65787 - postgresql_sequence: use query parameters with cursor object 5 years ago
Andrew Klychkov 28b3531824 Backport of 64585: Don't return module error when mysql_connect fails (#65596)
* mysql: add changelog fragment for PR 64585 (#65594)

* mysql: add changelog fragment for PR 64585

* change fragment name and bug description

(cherry picked from commit 85486b1ce4)

* Don't return module error when mysql_connect fails (#64560) (#64585)

* Don't return module error when mysql_connect fails (#64560)

mysql_user expects an Exception when using check_implicit_admin.

* Adds integration tests for mysql_user check_implicit_admin (#64560)

(cherry picked from commit 47aea84924)

* remove tests

Co-authored-by: Jürgen Hötzel <juergen@hoetzel.info>
5 years ago
John Chen 4a05724fd7 [stable-2.9] user - compare macOS user properties using same type (#62973)
self._get_user_property returns a string, so when doing a comparison
using this value, cast the second variable to a string so that the
comparison behaves correctly
* Add changelog
* Add to_text import
* Add integration test.
(cherry picked from commit c73288ad53)

Co-authored-by: John Chen <kryptonite303@users.noreply.github.com>
5 years ago
Abhijeet Kasurde d2c21af3f7 Fixed argument spec for multiple modules (#65496)
This change contains fixes for argument spec and respective datatypes.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 96df2bdcf3)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
parmsib 636f26f07e Make docker_stack adhere to standard ansible return values (#63467)
* Make docker_stack adhere to standard return values

The names of the various fields returned from ansible modules are e.g defined here https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#msg.

Adhering to this improves usability and makes use of functionality for e.g stdout_lines etc.

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Fix under-indentation of continuation line (pep8)

Issue exposed in test here https://app.shippable.com/github/ansible/ansible/runs/146667/1/console

* Don't break old playbooks/roles

Made sure the changes are only adding new variables, not removing anything existing yet.

* Added comment

* Minor fixes

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* minor change to docker_stack.py

* Add changelog fragment for PR 63467

* Format changelog fragment

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

* Add fragment about docker_stack return val depr

* Add docker_stack doc note about deprecated vals

* Remove whitespace in empty line

* Add docker_stack depr notice to porting guide

* Update changelogs/fragments/63467-docker-stack-return-fix.yml

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

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

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

* Update lib/ansible/modules/cloud/docker/docker_stack.py

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

* Added back a missing new line

(cherry picked from commit a5d69f2a26)
5 years ago
Matt Davis b148d06bda Update 64902-fix-allow-duplicates-in-single-role.yml 5 years ago
Kiyo Nagamine 8538127bdc Ensure `allow_duplicates: true` enables to run single role multiple times (#64902) (#65063)
* Ensure `allow_duplicates: true` enables to run single role multiple times(#64902)

* Changed return value in `_load_roles` . Fixes #64902

* Add changelog fragment

* Add an integration test for the issue

* Fix changelog generation error and integration test.

* Fix yaml syntax error in changelog fragment

(cherry picked from commit daecbb9bf0)
5 years ago
Felix Fontein 6586623a75 docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

* Unit tests no longer make sense, since the part of the code they test has been removed.

* Re-add CIDR validation. Move it to better position (module setup instead of idempotence check).

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.

(cherry picked from commit 17ef253ad1)
5 years ago
Marcel b5f817ca26 docker_container - #65993 - update restart policy (restart policy & restart retries) wit… (#66192)
* #65993 - update restart policy (restart policy & restart retries) without restarting the container

* - proper indentation on the continuation-line
- set restart_policy to the correct value independent from the api version

* - move restart_policy definitions into the if block
- add a new variable for the restart_policy configuration value

* add changelog fragment

* typo; minus -> underscore

* rename changelog fragment to contain the correct module name

* rename restart_policy_config_value to just restart_policy and refer to the correct dict values

(cherry picked from commit 02c126f5ee)
5 years ago
Felix Fontein cd348c123b [2.9] docker_container: wait for removal if removal is in process (#66117)
* docker_container: wait for removal if removal is in process (#65854)

* Allow to inspect containers directly.

* Wait for containers to be removed before recreating them.

* Also wait for containers to be removed before creating them.

* Add changelog.

(cherry picked from commit 4df5bdb11e)

* Don't wait for removal during check mode. (#66145)

(cherry picked from commit 14e32c85b4)
5 years ago
Guillaume Martinez 1159193d16 [Backport 2.9] gitlab_runner: fix idempotency for shared runners (#65545)
* gitlab_runner: fix idempotency for shared runners (#65176)


(cherry picked from commit 2eb615f1ef)

* add changelog
5 years ago
Ian Wienand b05a2c8a62 dnf: don't return fail_json['msg'] as list (#65302)
Although it's not enforced that fail_json['msg'] should be a string
[1], I think it is pretty strongly implied.

In this case the failure_response['msg'] is sent through as the
fail_json['msg'], and the trailing commas here turn it into a tuple.
It's not clear if this is a typo or intended, but it does cause
problems for callbacks that expect this as a string (e.g. [2]).

Since there seems no point to having these values as a tuple, remove
the trailing commas so they return a string as per everywhere else.

[1] 4c589661c2/lib/ansible/module_utils/basic.py (L2078)
[2] https://review.opendev.org/#/c/696081

(cherry picked from commit fc54ae9227)
5 years ago
Sam Doran e6db6d0d64 [stable-2.9] Handle InternalError raised by cryptography when running in FIPS mode (#65477)
Since older versions of paramiko do not require cryptography,
we cannot catch the exact exception from cryptography.

Remove other exceptions since we're catching everything now
(cherry picked from commit d35c1a435b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 003e9fdecd [stable-2.9] user - honor update_password parameter on BusyBox hosts (#65977)
The check for this parameter was missing from BusyBox.modify_user(), resulting in unexpected password changes to existing user accounts.
(cherry picked from commit 18130e1419)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Hannes Ljungberg 2858983de3 docker_swarm_service: Fix parsing of Healthcheck.StartPeriod (#66151)
* Parse Healthcheck.StartPeriod properly

* Add changelog fragment

* Use proper markup in changelog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f31b8e08b2)
5 years ago
Ganesh Nalawade 1257448636 [2.9] Fix nxos_file_copy option value path validation (#65846)
* Fix nxos_file_copy option value path validation (#65423)

* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments

(cherry picked from commit 88008badb1)

* Fix review comments
5 years ago
Abhijeet Kasurde a1b0f72c98 [2.9] solaris_zone: Allow only valid characters in zone name
CVE-2019-14904 - solaris_zone module accepts zone name and performs actions related to that.
However, there is no user input validation done while performing actions.
A malicious user could provide a crafted zone name which allows executing commands
into the server manipulating the module behaviour.

Adding user input validation as per Solaris Zone documentation fixes this issue.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 7d2ae7e322)
5 years ago
Adam Miller 04ad3fcc89 [stable-2.9] DNF Handle Empty AppStream stream definition (#63819)
* DNF Handle Empty AppStream stream definition

Fixes #63683

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

* Switch Fedora dnf test target modularity to stratis

In Fedora 29, the metadata was not properly set for a default stream
for ripgrep even though there is a profile called "default", however
that's an arbitrary string and the module maintainer must set the
default stream (which it never was for the ripgrep module, thus
failing the "empty stream" install test)

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

Co-authored-by: Adam Miller <admiller@redhat.com>
5 years ago
Matt Clay 374e3b12f6 [stable-2.9] Add ansible-test constraint to avoid coverage 5.0+
(cherry picked from commit 9ea5b539b6)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Dusan Matejka 56120d034a Backport/2.9/65145 zabbix modules now require higher version of underlying python module (#65602)
* updated required zabbix-api version for zabbix modules

(cherry picked from commit f48ac0da5d)

* added changelog fragment
5 years ago
Matt Clay 9ba42a50f3 [stable-2.9] Fix plugin paths for ansible-test pylint test. (#65526)
* Fix plugin paths for ansible-test pylint test.
(cherry picked from commit fb69d68)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Davis f2285203dc New release v2.9.2 5 years ago
Nilashish Chakraborty d434e3f1a0 Fix legacy facts keys having redundant underscore (#65167) (#65504)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 62c4ff8174)

Add changelog for nxos_facts fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Andrey Klychkov 6012f1ef67 Backport of 65310: postgresql_owner: use query_params with cursor (#65322) 5 years ago
chkp-orso 999f91a705 [2.9] Check Point: fix all modules to be able to get parameter with value false (#65110)
* fix all modules to be able to get parameter with value false (very important fix) (#65040)

* add import of future and __metaclass__

* fix all modules to be able to get parameter with value false (very importent fix)

* Update ignore.txt

(cherry picked from commit b1e6667664)

* Update ignore.txt

* Create 65043-enable-parameter-value-to-be-false.yaml

* Update 65043-enable-parameter-value-to-be-false.yaml
5 years ago
Felix Fontein f2107695e6 [2.9] pulp_repo: renamed module tls client auth params to avoid overlaping with fetch_url (#65014)
* renamed module tls client auth params to avoid overlaping with fetch_url (#59522)

* renamed module tls client auth parameters to avoid overlaping with ansible fetch_url

* added version_added info for params

* Updated version_added

Updated version_added info from 2.9 to 2.10

* Update pulp_repo.py

removed version_added for renamed params

* Apply suggestions from code review

added ca_cert alias and 'version_added'

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Apply suggestions from code review

added old behavior for client_cert and client_key which will deprecate in 2.14

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* Update pulp_repo.py

fix for linting error ansibot is complaining

* added changelog fragment for 59522

* Apply suggestions from code review

more informative depreciation warning and changelog fragment

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

* added mention for changes in client_key and client_cert behavior

* fixed too long line (linting)

* deprecated ca_cert alias to have consistent module params in Ansible 2.14

* fixed indentation for deprecation warning

* changed deprecated alias handling to argument_spec

* moved deprecated_aliases insied argument dict, thanks tremble

* suggestions from felixfontein

Move doc info about client_cert and client_key into its own paragraph

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1e59017d27)

* 2.10 -> 2.9.2

* * Adjust messages.

* Fix one more.

(cherry picked from commit d1c58bc942)
5 years ago
Matt Martz 95ff4372ec [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202) (#65427)
* [stable-2.9] Do not treat AnsibleUndefined as being unsafe (#65202)

* Do not treat AnsibleUndefined as being unsafe. Fixes #65198

* fix yaml formatting.
(cherry picked from commit b08e7daf46)

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

* Linting fix

* additional linting fix
5 years ago
Will Thames 612d70ba3c Remove k8s_scale dependency on k8s_raw (#65270)
* Remove k8s_scale dependency on k8s_raw (#59887)

* Remove k8s_scale dependency on k8s_raw

* fix sanity checks

(cherry picked from commit e60cdc310d)

* Add changelog fragment

* Rename 59887-scale-bug to 59887-scale-bug.yml
5 years ago
Andrey Klychkov 81a7957929 Backport of 65093, postgresql_lang: use query parameters with cursor.execute() (#65165)
* Backport of 65093, postgresql_lang: use query parameters with cursor.execute()

* fix CI tests
5 years ago
tcraxs 96126c26fb fix module that it reports the correct status of a change (#65098)
* fix module that it reports the correct status of a change

(cherry picked from commit 2028734ac3)

* postgresql_privs - fix sort comparison (#65125)

The result of .sort() is None, not the sorted object. The comparison was comparing the result of the .sort() method and not the sorted values.

(cherry picked from commit 426e37ea92)
5 years ago
Jordan Borean 87d9a088d0 config manager str type vault source (#65023) (#65090)
* config manager str type vault source

* Convert vault text to_text earlier and add tests

(cherry picked from commit 7092c196ed)
5 years ago
Abhijeet Kasurde 5a48f7ea6b [2.9] collection: Provide additional info about collection name restriction (#65276)
Fixes: #65151

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 9dca2bd3c4)
5 years ago
Andrey Klychkov 4b9644c00b Backport of 64661, postgres.py: add query_params (#65034) 5 years ago
Andrey Klychkov 7b18723858 Fix postgres_user not commiting changes when groups is set (#64835) 5 years ago
Dusan Matejka 9e023a91a6 zabbix_action module no longer requires event_source and esc_period arguments when state is absent (#64736)
(cherry picked from commit d8e014980f)
5 years ago
Abhijeet Kasurde c30e340094 [2.9] include_vars: Check NoneType for raw_params (#65301)
Lookup 'first_found' returns empty list which results in
raw_params checking. Check NoneType for 'raw_params' before
proceeding.

Fixes: #64939

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8d0c2cd4d5)
5 years ago
Jordan Borean 1c2f36d4d9 ansible-galaxy - Add User-Agent to requests (#65438) (#65441)
(cherry picked from commit 8648003c1f)
5 years ago
Felix Fontein b133384895 openssh_keypair: fix idempotence issue (#65017) (#65128)
* Fix idempotence issue.

* Add changelog.

(cherry picked from commit b36f572256)
5 years ago
Felix Fontein 93186e453f openssl_csr: make sure privatekey_path is specified when state is present (#65435) (#65461)
* Make sure privatekey_path is specified when state is present.

* Add changelog.

(cherry picked from commit ae4363f6d1)
5 years ago
Jordan Borean 03b5a6f5d6 galaxy - print HTTP reason on unknown error (#65273) (#65439)
(cherry picked from commit 6586b7132c)
5 years ago
Jordan Borean d93f56dccb Fix using a URL for galaxy collection install (#65272) (#65432)
* Fix using a URL for galaxy collection install

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Sloane Hertel <shertel@redhat.com>
(cherry picked from commit 694ef5660d)
5 years ago
Felix Fontein 955cebdd04 proxmox: fix proxmox 6 version detection by using LooseVersion (#59165) (#65379)
* proxmox: use 'release' key for version detection if possible

* proxmox: fix PEP issues

* add changelog fragment

* Uses LooseVersion for proxmox version detection

* move imports

* removes useless comment

(cherry picked from commit 38193f6b60)
5 years ago
Felix Fontein d7d00ed36d acme_certificate: Fix ACME v1 support when modify_account is set to false (#64648) (#65412)
* Fix ACME v1 when modify_account is set to false.

* Add changelog.

(cherry picked from commit 08b53b94a9)
5 years ago
Abhijeet Kasurde 1ccfef9c5a [2.9] VMware: Fix typo in fail_json in vmware_guest_powerstate (#65163)
Fixed typo from "chanaged" to "changed"

Fixes: #65161

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit d7039b6633)
5 years ago
Satyajit Bulage 1ca54af370 Handle LibraryError exception in postgresql_db (#65229) (#65247)
* Added changes into changelogs/fragments
* Removed no longer used 'LibraryError'.

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
(cherry picked from commit 5f8ec4d46e)
5 years ago
Xu Yuandong b816e7c82e Update plugins/netconf/ce.py to fix a bug(failed to get veriosn information via neocnf). (#65065) (#65232)
* fix version fail.

* add a changelog fragment.

* Update ce.py

* Rename plugins-netconf-ce-fix.yaml to 65065-plugins-netconf-ce-fix.yaml

* Update ce.py

(cherry picked from commit da8ec327cc)
5 years ago
Felix Fontein a4e055e0cd docker_container and docker_network: avoid None errors (#65018) (#65235)
* Avoid None errors.

* Add changelog.

(cherry picked from commit 63b94fca7e)
5 years ago
Felix Fontein cf269667c1 docker_swarm_service: Sort lists when checking for changes (#63887) (#65221)
* docker_swarm_service: Sort lists when checking for changes

When two lists are checked for changes in this module, the lists are
reported changed when the order of the items is different. This PR
resolves this issue.

* docker_swarm_service: Minor typo fix

* docker_swarm_service: Another minor typo

* docker_swarm_service: Should use sorted(), not sort()

* docker_swarm_service: Sort lists of dictionaries

* docker_swarm_service: Fix style issues in tests

* docker_swarm_service: Updates to integration tests

* docker_swarm_service: Casting string types within lists when comparing

* docker_swarm_service: Special handling of unordered networks with ordered aliases

* docker_swarm_service: Sorting network lists

* docker_swarm_serivce: Better unit test code coverage for lists and networks

* docker_swarm_service: Fixed coding style for sanity tests

* docker_swarm_service: More coding style fixes

* docker_swarm_service: Ignoring test for Python < 3

* docker_swarm_service: Update to version info check for backwards compatibility

* docker_swarm_service: Added change fragment #63887

* docker_swarm_service: Better handling of missing sort key for dictionary of lists

* docker_swarm_service: Preventing sorts from modifying in-place

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

* docker_swarm_service: Removed spurious import in test

* docker_swarm_service: Preventing sorts from modifying more data in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit a096cd08c5)
5 years ago
Felix Fontein 0f1e63b236 [yarn] Set name_version when version is not specified (#62348) (#65213)
* Set name_version when version is not specified, fix #55097

This will default to installing the latest version available

* Add changelog fragment

* update changelog

(cherry picked from commit 136dc27572)
5 years ago
Ganesh Nalawade 7b3e63de71 Fix netconf post "delay persistent connections" (#63463) (#65137)
* ensure_connect on manager use

* Remove ensure_connected from individual netconf plugins

(cherry picked from commit f5e0995cae)
5 years ago
Jordan Borean 2fd6ed12fe Windows coverage - output temp files with UTF-8 BOM (#65086) (#65088)
* Windows coverage - output temp files with UTF-8 BOM
ci_complete ci_coverage

* Remove testing changes to get ready for merge

(cherry picked from commit 200fb00310)
5 years ago
Jie (Link) Zheng 0cec26f4eb Fix py2/py3 compability issue for httpapi plugin fortios (#64982) (#65091)
(cherry picked from commit bc479fcafc)
5 years ago
Matt Clay 68b8e0e797 [stable-2.9] Fix ansible-test handling of git submodules. (#65027) (#65075)
* Revert most of PR #61605 commit e218c9814c

This removes the git error handling that converted all git errors into warnings.

* Fix ansible-test handling of git submodules.
(cherry picked from commit ba273c72d8)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Abhijeet Kasurde 3c37d572aa [2.9] vmware_guest: Revert custom value customization in guest (#65059)
Due to confusion between 'Custom Attributes' and 'Advanced options',
this change got in devel. Revert to original behavior i.e. customizing
custom values using vmware_guest is done in this PR.

Fixes: #64291

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a6bc43ba47)
5 years ago
Jordan Borean cd37b2df60 become - stop using play context in more places (#62373) (#64965)
* become - stop using play context in more places - ci_complete

* Fix up review points

(cherry picked from commit 480b106d65)
5 years ago
Martin Krizek 0de8379ee3 Fix ansible_failed_{task,result} undefined in rescue (#64831) (#64843)
This is a fix for a regression introduced by Perfy. Since then we mainly
operate on host.name instead of the Host object. In a call to
set_nonpersistent_facts where we set ansible_failed_task and
ansible_failed_result variables we were still passing the object which
led to those vars being undefined.

Fixes #64789

(cherry picked from commit 5c0b2c151c)
5 years ago
Jordan Borean ca5e7e7cc2 win_chocolatey: Fix error when choco.exe not found (#53115) (#64881)
* win_chocolatey: Fix error when choco.exe not found

* Slight tweak to check and added changelog fragment

* Removed ignore rule that's no longer needed

(cherry picked from commit 521d6465f6)
5 years ago
Jordan Borean 18af2d257f win_domain_computer module: Fix idempotence when name != sam_account_name (#56967) (#64816)
* win_domain_computer module: Minor documentation error

* Fix idempotence when name != samaccountname

* Added changelog

* Added unsupported alias for CI check

(cherry picked from commit 04b8f75ffa)
5 years ago
Jordan Borean f3c58f554c allow using --check on win_iis_webapppool module (#50528) (#64812)
* allow using --check on win_iis_webapppool module

* Added changelog and slight logic tweak

* Fix typo in changelog fragment

(cherry picked from commit 23a751323b)
5 years ago
Michael Shen 07365b2040 Backport/2.9/64397 (#64790)
* [FIX] graceful is not an immutable attribute

(cherry picked from commit 1f4d15fc55)

* [ADD] changelog fragment for PR 64397 to stable-2.9
5 years ago
Xu Yuandong 04d32c503f Backport/2.9/64351 Doc notes 6 (#64351) (#64949)
* Doc notes 6 cloudengine (#64351)

(cherry picked from commit 25e03b1e75)

* add a change log
5 years ago
Xu Yuandong f3699c80be Backport/2.9/64928 Doc notes 5 (#64928) (#64948)
* Doc notes 5 cloudengine (#64928)
* new version 2.10 can not be backported

(cherry picked from commit 8ea9d0c06a)

* add a change log
5 years ago
Xu Yuandong 19447485b8 Backport/2.9/64927 Doc notes 4 (#64927) (#64951)
* Doc notes 4 cloudengine (#64927)

(cherry picked from commit 2ccdf29b5b)

* add a change log
5 years ago
Xu Yuandong 039dc88b10 Backport/2.9/64348 Doc notes 3 (#64348) (#64947)
* Doc notes 3 (#64348)

(cherry picked from commit ad0769c095)

* add a change log
5 years ago
Xu Yuandong 0089df4cab Backport/2.9/64347 Doc notes 2 (#64347) (#64946)
* Doc notes 2 (#64347) 
* Update ce_evpn_bgp_rr.py
* Update ce_evpn_bgp.py

(cherry picked from commit 9e3b1f3b32)

* add a change log
5 years ago
Xu Yuandong 1f9a500b54 Backport/2.9/64346 Doc notes 1 (#64346) (#64950)
* Doc notes 1 (#64346), backport of #64950

(cherry picked from commit 705c014ec3)

* add  a change log
5 years ago
Matt Davis 6c051b0241 New release v2.9.1 5 years ago
Gonéri Le Bouder 8b3d1581bd [stable-2.9] vmware_host_firewall_manager: fix #61332 (#63567) (#64410)
Since https://github.com/ansible/ansible/pull/56733, we were not able to apply
firewall rules with no `allowed_hosts` key.

closes: #61332

In addition, this patch ensures the `allowed_hosts` key accepts a dict,
instead of a dict in a single entry list.

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        - all_ip: False
          ip_address:
            - "1.2.3.4"
```

Should be written:

```yaml
vmware_host_firewall_manager:
  esxi_hostname: "{{ esxi1 }}"
  rules:
    - name: NFC
      enabled: True
      allowed_hosts:
        all_ip: False
        ip_address:
          - "1.2.3.4"
```

(cherry picked from commit ab2aaca61d)
5 years ago
Nathaniel Case 1e0d7ac25b [stable-2.9] Eos vlan override (#63639) (#63687)
* [stable-2.9] Eos vlan override (#63639)

* Fix overridden & deleted in eos_vlans

* Fix vlan creation in overridden

* Right, Python 2.6
(cherry picked from commit 741d529)

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

* eos_vlans: Never try to set vlan_id as a property (#63689)

(cherry picked from commit d98482c294)

* Add changelog
5 years ago
Jordan Borean 65ab51082b Improve handling of "restarted" state for win_iis_website module (#63829) (#64760)
* Improve handling of "restarted" state for win_iis_website module

* Added changelog fragment

(cherry picked from commit bd9a0b6700)
5 years ago
Jordan Borean 25f8d0dcd3 win_acl no longer needs SeSecurityPrivilege (#57804) (#64758)
* win_acl no longer needs SeSecurityPrivilege
Set-ACL raises missing SeSecurityPrivilege error when the inheritance
from the parent directory is disabled.

* fixes test sanity

* registry rights can only be modified with Set-ACL

* add changelog

(cherry picked from commit 95d613f3ab)
5 years ago
Jordan Borean d2d9a60eab Corrected Get-adcomputer (#63093) (#64756)
* Corrected Get-adcomputer

Corrected Get-adcomputer on "Remove-ConstructedState" and "Set-ConstructedState" functions.
resolved error: Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.

* Update lib/ansible/modules/windows/win_domain_computer.ps1

Co-Authored-By: Daniel-Sanchez-Fabregas <33929811+Daniel-Sanchez-Fabregas@users.noreply.github.com>

* Update win_domain_computer.ps1

changed
"-credential $credential" to "@extra_args" (Line 115 and 150)
corrected exception message (Line 122)

* Added changelog fragment, minor code tweak

(cherry picked from commit e77426dad3)
5 years ago
Sumit Jaiswal 65f945fab1 Fix IOS_VLANS override operation for new VLANs (#63667)
* Fix IOS_VLANS override operation for new VLANs (#63624)

* fix vlans override state

* adding code comment

(cherry picked from commit 4f2665810f)

* changelog for 63624
5 years ago
Andrea Tartaglia 50bbd72694 gitlab_user: Fix ssh key add and group membership add when there's other changes (#63621) (#63634)
* Fixed syntax in sshkey/group add

* Added changelog

* pep8 fix

(cherry picked from commit b4bb3dee9a)
5 years ago
Matt Martz 20735f6b5b [stable-2.9] Explicitly use multiprocessing fork start method (#63581) (#63591)
* Explicitly use multiprocessing fork start method

* Remove unused import

* Remove unused import

* Fallback to just multiprocessing on py2
(cherry picked from commit 82ee341)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Nilashish Chakraborty 14b48062ee Fix traceback for empty config (#62520) (#63090)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 67213ccb4d)

Add changelog for vyos traceback fix
5 years ago
Nilashish Chakraborty 5558b43f27 Fix traceback for empty config (#62515) (#63089)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit fc5358cea0)

Add changelog for IOS-XR traceback fix

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

Remove empty spaces
5 years ago
Pilou 5ca92a848c package_facts: check 'vital' and 'automated' values ('pkg' manager) (#62766) (#62825)
(cherry picked from commit 278398555d)
5 years ago
Sam Doran 3a5bd5be18 [stable-2.9] Account for empty strings when splitting the host pattern (#62442) (#62679)
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
(cherry picked from commit 987265a6ef)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Abhijeet Kasurde 7dad6ca149 [2.9] core: Handle empty extra vars in cli (#62240)
Fixes: #61497

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a2e61f67d5)
5 years ago
Xu Yuandong b5dabab16e ce_config/bug/jingdong: a bug from jingdong. (#62872) (#63980)
* update to fix "`quit` may make seesion closed."

* update to fix "`quit` may make seesion closed."

* 274:49: E272: multiple spaces before keyword

* add a changelog fragment.

* Update ce_config.py

using run_command for prompts.

* Update ce_config.py

* Update ce_config.py

typo error

* update to use get_prompt

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

* Update ce_config.py

(cherry picked from commit e4b6dd1862)
5 years ago
yanzhangi fd392ecb46 [Backport/2.9/64018]update ce_acl_interface to fix bugs (#64025)
* update ce_acl_interface to fix bugs

(cherry picked from commit 2849738e24)

* Module modification information
5 years ago
Sumit Jaiswal 7ca3b677c4 Backport PR to Fix ios_l2_interfaces skipping relevant L2 interfaces facts (#63893)
* Fix ios_l2_interfaces skipping relevant L2 interfaces facts (#63779)

* fix bug 63777

* fix comment

(cherry picked from commit d620a209a5)

* changelog
5 years ago
Sam Doran cdc6577395 [stable-2.9] syslogger - disable check mode (#63646) (#63750)
(cherry picked from commit dcec3d000e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Ganesh Nalawade 2822744c68 dest lives in 4 different places depending on exeuction type (#62444) (#63283)
(cherry picked from commit d4ad541eee)
5 years ago
Martin Nečas 8674090b19 Ovirt fix fetching of nested attributes backport (#63787)
* ovirt: Fix fetching of nested attributes (#61841)

This patch is fixing the fetching of nested attributes.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1748025

* add changelog
5 years ago
Martin Nečas 7df4550611 Ovirt disk correct fcp host backport (#63898)
* ovirt disk correct fcp host (#63857)

* add changelog
5 years ago
Abhijeet Kasurde 46b82cf01b [2.9] Fix typo in vmware_content_deploy_template docs (#63176)
Fixing typo mistake in testbed with section.
Deploy template from content library is supported from 67U3.

(cherry picked from commit c6c13b5626)
5 years ago
Martin Nečas 49f1760fea Ovirt correct resloving false atrs backport (#63953)
* ovirt correct resolving nested atributes which are false (#63908)

* add changelog
5 years ago
Rémi REY c65e003796 Fix grafana_datasource fails when name with spaces (#63987)
(cherry picked from commit df6b7bf77f)
5 years ago
Ganesh Nalawade 5a2d55a51f Fix network plugin config option load from collection (#64046)
* Fix network plugin config option load from collection

Fixes #63975

* Update the complete sub-plugin name within network
  connection plugins to handle sub-plugin in collection
  scenario.

* Fix review comments

(cherry picked from commit 60276d3d8d)
5 years ago
Sumit Jaiswal 73f42d22ff Backport PR to fix ios_interfaces where non-existing virtual/loopback interfaces was not getting configured (#64259)
* fix bug 63761 (#63901)


(cherry picked from commit be1bcc7450)

* changelog
5 years ago
Sloane Hertel 153f8341a5 Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog

(cherry picked from commit 371d7aae31)
5 years ago
richardsonky 94c8ca6c3e Master (#62626) (#62743)
* Master (#62626)

* Update win_package.ps1

Update Test-Path to use -LiteralPath instead of -Path to fix issue where powershell will not detect path with special characters such as '=' and '[]'.

* Update win_package.ps1

modified other instances of -Path and changed to -LiteralPath.  All except line L243 since it is a different function.

* added literal path to get-itemproperty

(cherry picked from commit 153a322f54)

* add fragment
5 years ago
Martin Nečas cf31833a48 [2.9] Ovirt vm cpu treads docs backport (#64413)
* ovirt_vm: update cpu_threads docs (#64380)

* add changelog
5 years ago
Martin Nečas 870294b2ed Ovirt host network dict correct backport (#64444)
* Ovirt host network dict correct (#64437)

* ovirt_host_network: correct comparing of two dicts

* update mode_number for 4th option

* add changelog

* add changelog
5 years ago
Jordan Borean 93d9a091a3 [stable-2.9] Fix up role version pagination for Galaxy install (#64373)
* Fix up role version pagination for Galaxy install

* Fix sanity issue
(cherry picked from commit 7acae62fa8)

Co-authored-by: Jordan Borean <jborean93@gmail.com>
5 years ago
Felix Fontein 64665ffcc9 ansible-test: bumping ACME test container version (#64424)
* Bumping ACME test container version.

* Add changelog.

(cherry picked from commit f4ff45dcd4)
5 years ago
Martin Krizek c44cd68aa2 template lookup: fix regression when templating hostvars (#64070)
This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940

(cherry picked from commit cd8ce16d48)
5 years ago
Matt Martz 26e8474f6d [stable-2.9] unsafe wrapping should only happen for with_ loops (#64401)
* unsafe wrapping should only happen for with_ lookups. Fixes #64379. Addresses #64169

* edit porting guide entry

* typo in changelog fragment

* typo

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* punctuation

Co-Authored-By: Sandra McCann <samccann@redhat.com>
(cherry picked from commit 254788b)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
n0trax 270f851e7a Replace clear() method for backward compatibility. (#64504)
(cherry picked from commit 27d3dd58a4)
5 years ago
Andrey Klychkov 8528f414bd postgresql_publication: fix typo in module.warn (#64582)
* postgresql_publication: fix typo in module.warn

* postgresql_publication: fix typo in module.warn, add changelog

(cherry picked from commit 2039bf45fe)
5 years ago
Abhijeet Kasurde 3628c9c07e [2.9] Correct usage of API call in aws_config_aggregator
update_resource and delete_resource takes and requires four argument.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 21c8dae83b)
5 years ago
Kiyo Nagamine cef3036179 [2.9] Fixed tiny typo in interpreter_discovery.rst
Added missing '/'

(cherry picked from commit 84bffff96a)
5 years ago
Jeff Geerling 209865502a Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782)
(cherry picked from commit a6ec6c3175)
5 years ago
Paul Belanger 362a8ffd8c Remove unused variable for junos_user (#62311)
This isn't used any place, lets remove it to fix lint checks on our
network collections.

(cherry picked from commit 119acc1afe)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Martin Krizek e38f74159d 2.9: perf: reduce getting handler variables (#59969) (#64676)
* perf: reduce getting handler variables (#59969)

* perf: reduce getting handler variables

ci_complete

* Do not re-create templar

(cherry picked from commit 9ccef9e819)

* Add changelog
5 years ago
Matt Martz 28c4a41d9b [stable-2.9] Set alter_sys=True instead of False to address backwards… (#64686)
* [stable-2.9] Set alter_sys=True instead of False to address backwards incompat (#64670)

* Set alter_sys=True instead of False to address backwards incompat

* ci_complete

* Add integration test

* ci_complete

* sanity

* ci_complete

* Changelog fragment

* Update import test and validate-modules to match.
(cherry picked from commit b93d92ef9a)

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

* Rebase and add alter_sys to validate-modules
5 years ago
PRASOON KARUNAN V 46b79e386c change $partition variable name to $ansible_partition (#63968)
* change $partition variable name to $ansbile_partition

* Added changelog fragment

(cherry picked from commit 8b13836b1f)
5 years ago
Dusan Matejka d8ea223543 Backport/2.9/63785 - zabbix_host logout missing (#64735)
* added missing atexit logout for zabbix_host module

(cherry picked from commit 59ed663113)

* added changelog fragment
5 years ago
Abhijeet Kasurde f6a10b5633 [2.9] Remove temp directory created by wait_for_connection (#64738)
wait_for_connection creates AnsiballZ_ping.py in temp directory,
which remains on remote machine even after playbook run.

Fixes: #62407

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 68428efc39)
5 years ago
Felix Fontein d35a3a74cc openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984) (#64125)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.

(cherry picked from commit fed267df03)
5 years ago
Felix Fontein 1979b4bf76 docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637) (#64640)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.

(cherry picked from commit 574bd32db2)
5 years ago
Felix Fontein afc4218ac4 docker_login: Use with statement for accessing files (#64382) (#64392) (#64524)
* docker_login: Use with statement for accessing files (#64382)

* Update changelogs/fragments/64382-docker_login-fix-invalid-json.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>
(cherry picked from commit 52c4c1b00d)
5 years ago
Abhijeet Kasurde a0ec2976b2 [2.9] Callback: removing args from task_fields from Sumologic and Splunk plugin (#64274)
CVE-2019-14864 Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs

Fixes #63522

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c76e074e4c)
5 years ago
Sam Doran 8cc018d936 [stable-2.9] paramiko_ssh - Improve authentication error message (#64157) (#64163)
The error is not always an invalid username/password. It could be a connection timeout or refusal.
(cherry picked from commit d5fbe6573b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 68fcc7a50c [stable-2.9] copy - check for changes beyond first level of subdirectories (#58323) (#64111)
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>
5 years ago
Robert Osowiecki 39aba6d304 lineinfile - don't run os.makedirs on empty dir path (#63921) (#64091)
* Fix #63919: don't run os.makedirs on empty dir path

* integration test for lineinfile create: yes without path (Sam Doran <sdoran@redhat.com>)

(cherry picked from commit 3c978a3225)
5 years ago
Felix Fontein 0e4fe7a52b ACMEAccount.get_request check status code value lower boundary (#63140) (#64071)
* check status code value lower boundary

Any HTTP code below 200 cannot be considered a success, should be
handled like a failure instead.

This is particularly true for below zero status codes.

Fixes #63139

* provide changelog fragment

* ensure connection errors are handled in Acme module

* add fetch_url check to ACME.send_signed_request

* remove module.fail_json

* move _assert_fetch_url_success out of ACMEAccount

* fix ansible-lint errors

* use simplified syntax status checking

(cherry picked from commit 0d905a0496)
5 years ago
Roman b327e1e2c6 acl: fix module failure if there're spaces in a path (#63280) (#63811)
* Make acl module to work with whitespaces in path

* Added a changelog fragment

* Add quotes to changelog fragment

(cherry picked from commit 504d76e956)
5 years ago
Felix Fontein 02f45f45d7 Backportable subset of: openssl_csr: deprecate version option (#63432) (#63674)
Cherry-picked from ba686154b9.
5 years ago
Guillaume Martinez 61c323b199 Backport 2.9: Fix Gitlab module deprecation warning (#60425) (#63499)
* Fix Gitlab module deprecation warning (#60425)

* gitlab modules : Fix deprecation warnings and parameters

Also preparing for 2.10 deprecation

* gitlab modules : Correct deprecation message

(cherry picked from commit 7bb90999d3)

* gitlab_modules :  remove misssing required parameter (#63690)

* gitlab_group: remove required=True on server_url param

* gitlab_project: remove required=True on server_url param

* Revert "Example incorrect: server_url is required argument (#63670)"

This reverts commit b02467961a.
This modification shouldn't have been made.
This parameter is deprecated and #60425 forget to remove the required
parameter

(cherry picked from commit 0af32a1093)

* gitlab modules : Add changelog
5 years ago
Jordan Borean 0d993a6b78 Fix issue when setting an empty pass to no_log param (#62804) - 2.9 (#62814)
* 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
5 years ago
Matt Clay 64c52e6021 [stable-2.9] Fix ansible-test collections sanity import test. (#64467)
* Fix ansible-test collections sanity import test.

Resolves https://github.com/ansible/ansible/issues/64466

* Fix get_source implementation also.

* Fix is_package function.
(cherry picked from commit adcf9458f1)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 276f4b21de [stable-2.9] Fix ansible-test sanity requirements install.
This fixes ansible-test so it no longer tries to install sanity test dependencies on unsupported Python versions.
(cherry picked from commit 437e9b7063)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 259c278bcd [stable-2.9] Add constraint for pathspec.
This fixes installation of pathspec on Python 2.6.
(cherry picked from commit 32b57d57a0)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 8b0249c0b0 [stable-2.9] Add missing var for format string in ansible-test.
(cherry picked from commit 32979430d0)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 0586d2c630
Merge pull request #63537 from mattclay/backport-d829a50-stable-2.9
[stable-2.9] Fix use of deprecated function in xml module.
5 years ago
Matt Clay 7c5e08c059 [stable-2.9] Fix ansible-test env var mixing running commands.
(cherry picked from commit 6be4741f72)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay c271fd0df2 [stable-2.9] Fixes for validate-modules import handling. (#63932)
* Fix validate-modules support for collections.

- Relative imports now work correctly.
- The collection loader is now used.
- Modules are invoked as `__main__`.

* Remove obsolete validate-modules code ignores.

* Handle sys.exit in validate-modules.

* Add check for AnsibleModule initialization.

* Remove `missing-module-utils-import` check.

This check does not support relative imports or collections.

Instead of trying to overhaul the test, we can rely on the `ansible-module-not-initialized` test instead.

* Fix badly named error codes with `c#` in the name.

The `#` conflicts with comments in the sanity test ignore files.

* Add changelog entries.
(cherry picked from commit e9f8a34dce)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 22df4947e2 [stable-2.9] 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>
5 years ago
Xu Yuandong 30bbbdbe33 action/ce.py:clear configuration candidate when return to user-view. (#63513)
* clear configuration candidate when return to user-view.

* add a changelog fragment for the pr.

* Update 63513-ce_action_wait_prompt_trigger_time_out.yaml

* Update 63513-ce_action_wait_prompt_trigger_time_out.yaml

(cherry picked from commit 47c31c201b)
5 years ago
Sam Doran 0046d0be47 [temporary-2.9.1-branch-releng-only] lineinfile - use correct index value when inserting at the end (#63696)
(cherry picked from commit 92cd13a2cf)

Co-authored-by: Sam Doran <sdoran@redhat.com>
5 years ago
Sam Doran 96d304a894 [temporary-2.9.1-branch-releng-only] lineinfile - properly insert line when line exists and backrefs are enabled (#63763)
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>
5 years ago
Xu Yuandong c68507bcb0 Backport/2.9/62471 ce_link_status:update to fix a bug. (#62417) (#63423)
* update to fix a bug. (#62417)


(cherry picked from commit 7541dab1ef)

* add a changelog fragment.
5 years ago
Felix Fontein 67c02e5dee [2.9] crypto modules: improve return value list documentation (#63409)
* crypto modules: improve return value list documentation (#62929)

* Improve return value documentation by allowing entry for return values.
* Add docs formatting, adjust styling.
* Fix sample return value. (Taken from https://tools.ietf.org/html/rfc7517#appendix-A.1.)
* Work around abuse of .

(cherry picked from commit 054285c34c)

* Add changelog.
5 years ago
Felix Fontein 80233545cc docker_node_info: improve error handling (#63418)
* Improve error handling for get_service_inspect().

* Add changelog fragment.

(cherry picked from commit d753168e9d)
5 years ago