Commit Graph

29564 Commits (0dba2fe0dc4ac9dc3c4331ebb05d4ec922978fc2)

Author SHA1 Message Date
Felix Fontein 35333e127c
Fix ansible-doc's plugin name retrieval for text output. (#71965) 5 years ago
Abhijeet Kasurde 3728530c9a
[2.9] kubectl: redacted token and password from console log (#71535)
** SECURITY_FIX ** for CVE-2020-1753

kubectl connection plugin now redact kubectl_token and
kubectl_password from console log.

Fixes: ansible-collections/community.kubernetes#65

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde f6ac5f1ce0
[2.9] cgroup_perf_recap: Check if user wants to write to files or not (#71527)
if user sets 'write_files' to False or does not set value, then
handle file write related operations.

Fixes: #64936

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e82b28a920)
5 years ago
Mario Lenz d2b499eab1
[backport][2.9] vmware_guest: Add support for HW version 15 (vSphere 6.7U2) (#71565)
* vmware_guest: Add support for HW version 15 (vSphere 6.7U2)

* Update changelogs/fragments/71563-vmware_guest-support_hw_version_15.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jordan Borean 7e8ecb2e58
psrp - fix hang when copying an empty file (#71649) (#71650)
(cherry picked from commit b615789fcc)
5 years ago
Rick Elrod 9d54f13ec1 Prevent templating unused variables for {%include%} (#68749)
Fixes #68699

(cherry picked from commit ff1ba39c8a)
5 years ago
Martin Krizek a63baa3290
Provide more information in AnsibleUndefinedVariable (#71666) (#71877)
Fixes #55152

(cherry picked from commit 00b22ab55e)
5 years ago
Martin Nečas 3072e43909
Backport: ovirt_disk fix upload when direct upload fails (#71802)
ovirt_disk: fix upload when direct upload fails
5 years ago
Felix Fontein f35fed441e
interfaces_file: re.escape() old value
Backport of eb24b5707ee48c3186f771e3d5b1f04c9fba339f from community.general (https://github.com/ansible-collections/community.general/pull/873). (#71766)
5 years ago
Jordan Borean 5066ca696a
runas - create new SYSTEM token on become (#71714) (#71750)
(cherry picked from commit fc08c1f3c5)
5 years ago
Andrew Klychkov 512f658335
postgresql_user: fix false positive warning for no_password_changes option (#71715) 5 years ago
Rick Elrod ace7f247f2 [docker_login] Fix changed status for newer docker
Change:
- Newer docker versions report the same message whether or not a logout
  actually happened.
- Determine change status from looking at the config instead if we can.
- This also allows us to restore check_mode in logout and re-enable that
  test.

Test Plan:
- CI, re-enabled tests

Tickets:
- Refs 6248f2fb6f

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Timothy Visser ca6b9c4649
Backport documentation correction (#71632)
* Remove "mode: preserve" option from documentation #71486

(cherry picked from commit 7127d37466)
5 years ago
Rick Elrod 370ad5c7c6 Update Ansible release version to v2.9.13.post0. 5 years ago
Rick Elrod acf1a7ba40 New release v2.9.13 5 years ago
Rick Elrod 1d043e082b
[dnf] ensure packages are gpg-verified (#71540)
Change:
- By default the dnf API does not gpg-verify packages. This is a feature
  that is executed in its CLI code. It never made it into Ansible's
  usage of the API, so packages were previously not verified.
- This fixes CVE-2020-14365.

Test Plan:
- New integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Jordan Borean 8e3b754710
powershell - fix nested CLIXML parser (#71412) - 2.9 (#71450)
* powershell - fix nested CLIXML parser (#71412)

(cherry picked from commit 8897d7e2ff)

* Remove test that shouldn't have been backported
5 years ago
Jordan Borean ed57b0c565
psrp - use native copy mechanism - 2.9 (#71433)
* psrp - use native copy mechanism (#71409)

* psrp - use native copy mechanism

* Fix sanity issues

* Split the bugfix and deprecation into separate changelog fragments

(cherry picked from commit 985ba187b2)

* Remove deprecations for backport
5 years ago
Jordan Borean fe72da80a4
powershell - fix quoting values (#71411) (#71448)
* powershell - fix quoting values

* Add ignore for smart quote skip

(cherry picked from commit 72a7cb4a2c)
5 years ago
Ganesh Nalawade 084535470b
Fix netconf validate capability check (#71195) (#71221)
*  Use ``:validate`` string to check if the netconf
   server supports validate capability as per netconf RFC

(cherry picked from commit 7635d23cee)
5 years ago
David Shrewsbury f563365f8e
Fix play stats when rescue block is a child block (#70922) (#71335)
* check run state of current block only

* Add changelog and test

* Add test for issue 29047

(cherry picked from commit f2f6c34632)
5 years ago
Rhys b6c7598a20
[2.9] Fix issue with MongoDB 4.0.20 (#71393)
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
5 years ago
Dusan Matejka aa698ba9b6
Zabbix: Handle KeyError in zabbix_host module (#65392) (#71288)
Fixes: #65304
(cherry picked from commit 7b2cfdacd0)

Co-authored-by: sky-joker <sky.jokerxx@gmail.com>
5 years ago
Dusan Matejka 36fbd2d9fd
zabbix_proxy fix support for Zabbix 5.0 (#71290) 5 years ago
Joe Nichols f42bd0ecdd
[2.9] update example in known_hosts.py (#71418)
This addresses the issue reported in #71417
5 years ago
Ganesh Nalawade 67fab726b9
Fix commit timeout failure issue for netconf modules (#71291)
Fixes https://github.com/ansible-collections/cisco.iosxr/issues/74

*  ncclient API expects commit timeout value in either unicode
   or bytes format, hence convert the timeout value explicitly
   to string type.
5 years ago
Matt Martz 35d3ed5f10
[stable-2.9] Allow the TOML inventory to dump unsafe. Fixes #71307 (#71309) (#71318)
(cherry picked from commit 9da8801)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Matt Martz 48d99c0ff1
[stable-2.9] epoch can be a float with strftime filter. Fixes #71257 (#71314). (#71320)
(cherry picked from commit 6289570234)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Lorenzo Castelli 4a5aac0ac1
systemd - supports new systemctl output message for chroot (#71197) (#71329)
The message generated by systemctl has been updated in 9321e23c40, which requires a corresponding change in the systemd module.

In addition, this fixes the module when the SYSTEMD_OFFLINE environment variable is set.

(cherry picked from commit a1a50bb3cd)
5 years ago
Mark Chappell d2d1b44d5c
Partial backport of 60552 to fix ansible-collections/community.aws/198 (#71416) 5 years ago
Sloane Hertel d181bb0c8a
Fix meta tasks used with --flush-cache (#71311) (#71359)
* Remove incorrect code

(cherry picked from commit 88bfc7977d)
5 years ago
Jordan Borean 553f28be01
setup - Add defensive null check in case bios date is null (#71452) 5 years ago
Martin Krizek 15f3426971
_check_failed_state: always use the current/nested state (#71347) (#71456)
Fixes #71306

(cherry picked from commit 9792d631b1)
5 years ago
Rick Elrod 6b4977e3f4
Backport cron module regression fix (#71244)
Change:
- Backport of #71207

Test Plan:
- CI

Tickets:
- Fixes #71213
- Fixes #71217
- Fixes #71216
- Fixes #71226
- Refs #71207

Signed-off-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran ea8c219402
[stable-2.9] Revert "Change default file permissions so they are not world readable (#70221) (#70825)" (#71232)
This reverts commit 0199b1cf05.
5 years ago
Rick Elrod 0963154044 Update Ansible release version to v2.9.12.post0. 5 years ago
Rick Elrod 40091190b2 New release v2.9.12 5 years ago
Jordan Borean a57e6172f7
Ensure -k is set to delegated hosts without a pass (#71136) - 2.9 (#71167)
* Ensure -k is set to delegated hosts without a pass (#71136)

* Ensure -k is set to delegated hosts without a pass

* Fix up some broken tests

* Update task_executor.py

one possible fix, the other is updating winrm to normalize on 'password' like the other connection plugins

* Add alias for winrm and fix incorrect assumption

* Make sure aliases are used for keyword options

* Conditionally run test if sshpass is present, fix sanity

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
(cherry picked from commit 3f22f79e73)

* Backport subset of https://github.com/ansible/ansible/pull/69670
5 years ago
Brian Coca 4a6a9acea8
dont clobber facts in loop (#71032) (#71096)
* dont clobber facts in loop

	fixes #71031

(cherry picked from commit f9af27c631)
5 years ago
Brian Coca 6e8adc0526
reset logging to INFO (#70878) (#70882)
* reset logging to INFO (#70878)

- due to CVE-2019-14846
 - also added comments and test to avoid 'oportunistic' reversion

(cherry picked from commit 1223ce656a)

* Update keep_log_at_info.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Sloane Hertel 44cca5426f
[2.9] template connection variables accessed directly before using (#70657) (#70689)
* template connection variables accessed directly before using (#70657)

* template variables accessed directly when using them instead of FieldAttributes

(cherry picked from commit 8c213c9334)

* changelog
5 years ago
Nathaniel Case f8e4c103e9
Fix UnboundLocalError on net_put (#71086) 5 years ago
David Marthy e859a2b4e5
ipa module utils can not handle HA FreeIPA with Python3 #71110 (#71112)
* BUGFIX 2.9 ipa module utils can not handle HA FreeIPA with Python3

* Resolve comments on other PR
5 years ago
Abhijeet Kasurde aa58d8c9ed
[2.9] hashi_vault: Handle equal sign in secret name value (#70169)
Fixes: ansible/ansible#55658

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Martin Krizek bdcde11f9f
2.9: Detect failure in always block after rescue (#70094) (#70203)
* Detect failure in always block after rescue (#70094)

* Detect failure in always block after rescue

Fixes #70000

ci_complete

* Add more tests

(cherry picked from commit 0ed5b77377)

* add changelog

Co-authored-by: Matt Davis <mrd@redhat.com>
5 years ago
Martin Nečas 90334b1ddd
Backport: ovirt_vm fix cd attachment (#70932)
* Backport: ovirt_vm fix cd attachment

* add changelog

* fix formats

* Update changelogs/fragments/70932-ovirt_vm-fix-cd_iso-search.yml

Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Andrew Klychkov c632d74487
mysql_user: fix overriding user passowrd to the same (#70833) 5 years ago
Brian Coca 1b41129402
Allow hostvars delegation (#70331) (#70811)
* Allow hostvars delegation (#70331)

* ensure hostvars are available on delegation
* also inventory_hostname must point to current host and not delegated one
* fix get_connection since it was still mixing original host vars and delegated ones
* also return connection vars for delegation and non delegation alike
* add test to ensure we have expected usage when directly assigning for non delegated host

(cherry picked from commit 84adaba6f5)

* avoid returning more data

* remove unused return vars
5 years ago
Sam Doran 523d0f5665
[stable-2.9] cron - Allow non-ascii (UTF-8) chars in cron file paths and jobs (#70426) (#71134)
* Encode/Decode files in UTF-8
* Use helper function in ansible
* Add an integration test
* Use emoji in test data.
* add changelog
* Also support non-ascii chars in filepath and add tests about this.
* Also use non-ascii chars in replaced text and ensure not to break cron syntax.
* rename self.existing to self.n_existing
* rename crontab.existing to crontab.n_existing.
(cherry picked from commit 5ce47646ad)

Co-authored-by: psi / Ryo Hirafuji <ryo.hirafuji@link-u.co.jp>

* try removing name references for state=absent

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

Co-authored-by: psi / Ryo Hirafuji <ryo.hirafuji@link-u.co.jp>
Co-authored-by: Rick Elrod <rick@elrod.me>
5 years ago
Sam Doran 0199b1cf05
[stable-2.9] Change default file permissions so they are not world readable (#70221) (#70825)
* [stable-2.9] Change default file permissions so they are not world readable (#70221)

* Change default file permissions so they are not world readable

CVE-2020-1736

Set the default permissions for files we create with atomic_move() to 0o0660. Track
which files we create that did not exist and warn if the module supports 'mode'
and it was not specified and the module did not call set_mode_if_different(). This allows the user to take action and specify a mode rather than using the defaults.

A code audit is needed to find all instances of modules that call atomic_move()
but do not call set_mode_if_different(). The findings need to be documented in
a changelog since we are not warning. Warning in those instances would be frustrating
to the user since they have no way to change the module code.

- use a set for storing list of created files
- just check the argument spac and params rather than using another property
- improve the warning message to include the default permissions.
(cherry picked from commit 5260527c4a)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Fix jboss test

* Fix lamdba_policy test

* Fix aws_lamdba test

* Fix warning for new default permissions when mode is not specified (#70976)

Follow up to #70221
Related to #67794
CVE-2020-1736

When set_mode_if_different() is called with mode of 'None', ensure we issue
a warning about the change in default permissions.

Add integration tests to ensure the warning works properly.

* Fix tests
- actually use custom module 🤦‍♂️
- verify file permission on created files
- use remote_tmp_dir so we're ready for split controller
- improve test module so we can skip the call to set_fs_attributes_if_different()
- fix tests for CentOS 6

(cherry-picked from commit dc79528cc6)

* Use new category in changelog fragments
5 years ago