Commit Graph

1393 Commits (e9a190e9c19cb4898c2f264be099f625f77a5f14)

Author SHA1 Message Date
Jesse Pretorius (odyssey4me) e9a190e9c1 [backport 2.8] Bump min openstacksdk version for os_network/port_security_enabled
To make use of the port_security_enabled [a] parameter, [b] needs
to be present in the openstacksdk or the os_network module will
return an error like:

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

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] 8eb788af07

Backport-of: https://review.opendev.org/708119
Fixes: #62062
6 years ago
Sam Doran 5e411807e7 [stable-2.8] 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>
6 years ago
Matt Clay 6f5c94ffea [stable-2.8] 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>
6 years ago
Matt Davis d28e4b63c7 New release v2.8.8 6 years ago
Matt Clay 2d2c841ded [stable-2.8] Ignore warnings in ansible-test environment check.
(cherry picked from commit 3db1ac4f56)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Matt Clay 6af5aad3cf [stable-2.8] 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>
6 years ago
Adam Miller 3edff5d42a Backport/2.8/63713 yum single yum base instantiation 53286 non existent repos (#65575)
* 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>

* YUM - handle enable of non-existent repo (#53286)
6 years ago
Kiyo Nagamine 41bddb61b8 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

* Fix typo in a changelog fragment of #64902

(cherry picked from commit daecbb9bf0)
(cherry picked from commit 33094e6c8e)
6 years ago
Matt Clay bbbde15562 [stable-2.8] Add ansible-test constraint to avoid coverage 5.0+
(cherry picked from commit 9ea5b539b6)

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Felix Fontein 519846a1be 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)
6 years ago
Marcel 3f98e1ff4e 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)
6 years ago
Felix Fontein facf938690 [2.8] docker_container: wait for removal if removal is in process (#66118)
* 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)
6 years ago
Guillaume Martinez fc9d6ea64c [Backport 2.8] gitlab_runner: fix idempotency for shared runners (#65546)
* gitlab_runner: fix idempotency for shared runners (#65176)

* add changelog
6 years ago
Ian Wienand 11dd391784 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)
6 years ago
Sam Doran 576a906393 [stable-2.8] 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>
6 years ago
Sam Doran 15a53276aa [stable-2.8] 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>
6 years ago
Hannes Ljungberg 7a55bc1902 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)
6 years ago
Ganesh Nalawade 0d08d78637 [2.8] Fix nxos_file_copy option value path validation (#65847)
* 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 trailing whitespace in docs.

Co-authored-by: Matt Clay <matt@mystile.com>
6 years ago
Abhijeet Kasurde 589a415f88 [2.8] 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)
6 years ago
Will Thames e9bdf249f5 Remove k8s_scale dependency on k8s_raw (#65271)
* 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
6 years ago
Felix Fontein b186ba8ee3 acme_certificate: Fix ACME v1 support when modify_account is set to false (#64648) (#65413)
* Fix ACME v1 when modify_account is set to false.

* Add changelog.

(cherry picked from commit 08b53b94a9)
6 years ago
Felix Fontein 0ed744c0a0 openssl_csr: make sure privatekey_path is specified when state is present (#65435) (#65460)
* Make sure privatekey_path is specified when state is present.

* Add changelog.

(cherry picked from commit ae4363f6d1)
6 years ago
Felix Fontein b3f06706ba docker_container and docker_network: avoid None errors (#65018) (#65234)
* Avoid None errors.

* Add changelog.

(cherry picked from commit 63b94fca7e)
6 years ago
Xu Yuandong 0a6e22aeb0 Update plugins/netconf/ce.py to fix a bug(failed to get veriosn information via neocnf). (#65065) (#65231)
* 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)
6 years ago
Felix Fontein 188bd6dc54 [yarn] Set name_version when version is not specified (#62348) (#65214)
* 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)
6 years ago
Felix Fontein 96bdcbe90c openssh_keypair: fix idempotence issue (#65017) (#65127)
* Fix idempotence issue.

* Add changelog.

(cherry picked from commit b36f572256)
6 years ago
Guillaume Martinez 8b452357ce gitlab_user: Fix ssh key add and group membership add when there's other changes (#63621) (#65045)
* Fixed syntax in sshkey/group add

* Added changelog

* pep8 fix

(cherry picked from commit b4bb3dee9a)
6 years ago
Michael Shen 1593f68d72 Backport/2.8/64397 (#64794)
* [FIX] graceful is not an immutable attribute

(cherry picked from commit 1f4d15fc55)

* [ADD] changelog fragment for PR 64397 to stable-2.8
6 years ago
Xu Yuandong 290e63aba5 Backport/2.8/64351 Doc notes 6 (#64351) (#64945)
* Doc notes 6 (#64351)

(cherry picked from commit 25e03b1e75)

* add a changelog
6 years ago
Xu Yuandong c1c2c76ad0 Backport/2.8/64928 Doc notes 5 (#64928) (#64944)
* Doc notes 5 (#64928)

* new version 2.10 can not be backported

(cherry picked from commit 8ea9d0c06a)

* add a changelog
6 years ago
Xu Yuandong 23812f4b6e Backport/2.8/64927 Doc notes 4 (#64927) (#64940)
* Doc notes 4 (#64927)

* exclude new in 2.10

(cherry picked from commit 2ccdf29b5b)

* add a changelog, update 64940_update_modules_docs_notes.yml
6 years ago
Xu Yuandong 564570faf2 Backport/2.8/64348 Doc notes 3 (#64348) (#64941)
* Doc notes 3 (#64348)

(cherry picked from commit ad0769c095)

* add a changelog
6 years ago
Xu Yuandong 686592bdb1 Backport/2.8/64347 Doc notes 2 (#64347) (#64942)
* Doc notes 2 (#64347)
* Update ce_evpn_bgp_rr.py
* Update ce_evpn_bgp.py

(cherry picked from commit 9e3b1f3b32)

* add a changelog.
6 years ago
Xu Yuandong 5781d19ab5 Backport/2.8/64346 Doc notes 1 (#64346) (#64943)
* Doc notes 1 (#64346)

(cherry picked from commit 705c014ec3)

* add  a changelog.
6 years ago
Matt Davis 24220a618a New release v2.8.7 6 years ago
Jordan Borean 63b0ae494e Improve handling of "restarted" state for win_iis_website module (#63829) (#64759)
* Improve handling of "restarted" state for win_iis_website module

* Added changelog fragment

(cherry picked from commit bd9a0b6700)
6 years ago
Jordan Borean 39f83ce38c win_acl no longer needs SeSecurityPrivilege (#57804) (#64757)
* 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)
6 years ago
Jordan Borean 59f417c469 Corrected Get-adcomputer (#63093) (#64755)
* 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)
6 years ago
Xu Yuandong 2dbe024fcb ce_config/bug/jingdong: a bug from jingdong. (#62872) (#63978)
* 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)
6 years ago
yanzhangi 20a8bf592e {Backport/2.8/64018]update ce_acl_interface to fix bugs (#64024)
* update ce_acl_interface to fix bugs

(cherry picked from commit 2849738e24)

* Module modification information
6 years ago
Jordan Borean dfa74b5c52 change $partition variable name to $ansible_partition (#63968) (#64691)
* change $partition variable name to $ansbile_partition

* Added changelog fragment

(cherry picked from commit 8b13836b1f)
6 years ago
Abhijeet Kasurde 436b2c44f6 [2.8] Remove temp directory created by wait_for_connection (#64739)
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)
6 years ago
Martin Krizek 773644e35c 2.8: perf: reduce getting handler variables (#59969) (#64675)
* perf: reduce getting handler variables (#59969)

ci_complete

(cherry picked from commit 9ccef9e819)

* Add changelog

* Fix incorrectly resolved conflict

* set_available_variables
6 years ago
Felix Fontein 595bdfa8bb [2.8] openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#64126)
* openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984)

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

* Pass select_crypto_backend also to test implementation. This exists in devel but not yet in stable-2.8.
6 years ago
Harald Albers 85cb406753 Backport #59614 to stable-2.8 (#64011)
* VMware: Fix Service Content calls in vmware_deploy_ovf

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* add changelog
6 years ago
Dusan Matejka 0daa435467 Backport/2.8/58525 - Use atexit to logout after zabbix module run (#63783)
* Use atexit to logout after zabbix module run (#58525)

(cherry picked from commit d582efcc51)

* added changelog fragment
6 years ago
Felix Fontein d3e13aae09 Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782) (#64651)
(cherry picked from commit a6ec6c3175)
6 years ago
Felix Fontein 4f9a301594 docker_swarm_service: Allow source to be omitted for tmpfs mounts (#64637) (#64641)
* Allow source to be omitted for tmpfs mounts.

* Add changelog.

(cherry picked from commit 574bd32db2)
6 years ago
Felix Fontein d98b9ddb3b docker_login: Use with statement for accessing files (#64382) (#64392) (#64525)
* 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)
6 years ago
Abhijeet Kasurde 050f92f960 [2.8] Callback: removing args from task_fields from Sumologic and Splunk plugin (#64273)
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)
6 years ago