Commit Graph

48098 Commits (d181bb0c8a90f083b00fb4f45e2e48cafc78463d)
 

Author SHA1 Message Date
Sloane Hertel d181bb0c8a
Fix meta tasks used with --flush-cache (#71311) (#71359)
* Remove incorrect code

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

(cherry picked from commit 9792d631b1)
4 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>
4 years ago
Sandra McCann c87d3d6291
point all older release pages to devel (#71428) (#71430)
(cherry picked from commit 3be597419d)
4 years ago
Rick Elrod 7d61e47a0e
[stable-2.9] tests: Use `hg serve` instead of bitbucket for hg (#71398)
* tests: Use `hg serve` instead of bitbucket for hg

Change:
- Uses `hg serve` instead of a bitbucket repo for hg tests
- bitbucket no longer serves hg

Test Plan:
- CI, fixed integration tests

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Rick Elrod 7779137b71
[stable-2.9] disable mongodb_* tests, fix setup_mongodb (#71388)
* Disable mongodb_replicaset tests for now

Change:
- 4.0.20 breaks tests, disable for now

Test Plan:
- CI

Tickets:
- https://github.com/ansible-collections/community.mongodb/issues/136

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

* setup_mongodb: Nix RH package installation/removal

Change:
- Our RHEL and CentOS images make these unnecessary and they were
  broken.

Test Plan:
- CI

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

* Disable mongodb_shard tests for now

Change:
- 4.0.20 breaks tests, disable for now

Test Plan:
- CI

Tickets:
- https://github.com/ansible-collections/community.mongodb/issues/136

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Sandra McCann ca0f9b9e0f
Add Fest banner (#71360) (#71362)
Adds Fest banner, with fixes; updates existing banners, adds links.

(cherry picked from commit 9be8d723da)
4 years ago
Alicia Cozine 82182ee421
Adds fest link (#71241) (#71350)
* adds year-round link to AnsibleFest from the Ansible docs index page

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit ae3b8eec12)
4 years ago
Matt Davis 6123266c82 [stable-2.9] fix collection package root location under pytest >=6.0.0 (#70963).
(cherry picked from commit 86b6c4bbb6)

Co-authored-by: nitzmahone <nitzmahone@users.noreply.github.com>
4 years ago
Baptiste Mille-Mathias a534d8dc74
[doc] Fix link to packet inventory files in 2.9 branch (#71206)
fixes #71203
4 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.
4 years ago
Rick Elrod 0963154044 Update Ansible release version to v2.9.12.post0. 4 years ago
Rick Elrod 40091190b2 New release v2.9.12 4 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
4 years ago
Felix Fontein 02be2a13db
ansible-test: bump acme test container version to 2.0.0 (#71097) (#71166)
(cherry picked from commit 050841324c)
4 years ago
Rick Elrod 9cc782eebc
[tests] pin docker to <4.3.0 (#71192)
Change:
- New python docker lib wants a newer docker than we have in CI.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Brian Coca 4a6a9acea8
dont clobber facts in loop (#71032) (#71096)
* dont clobber facts in loop

	fixes #71031

(cherry picked from commit f9af27c631)
4 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>
4 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
4 years ago
Nathaniel Case f8e4c103e9
Fix UnboundLocalError on net_put (#71086) 4 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
4 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>
4 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>
4 years ago
Rick Elrod 9ba99ead4f
Update integration tests to support rpmfluff-0.6 (#71155) (#71160)
Co-authored-by: Matt Martz <matt@sivel.net>
4 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>
4 years ago
Andrew Klychkov c632d74487
mysql_user: fix overriding user passowrd to the same (#70833) 4 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
4 years ago
Rick Elrod 66faa29b79
Add CVE reference to changelog for PR 70762 (#71151) (#71153)
Co-authored-by: David Shrewsbury <Shrews@users.noreply.github.com>
4 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>
4 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
4 years ago
Sloane Hertel 6cae9a4b16
copy - redact 'content' from invocation in check mode (#71033) (#71068)
* sanitize copy module invocation secrets in check mode

(cherry picked from commit 991714b9d1)
4 years ago
Abhijeet Kasurde 59c9a1833e
[2.9] api: time.clock compatible code (#70678)
time.clock is removed in Python 3.8. Add time.clock
compatible code.

Fixes: #70649

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 055871cbb8)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Alicia Cozine bc378ae643
Warning banner should only show on `/devel/` docs, not on pages with 'devel' in their titles (#70849) (#71076)
* banner should not be placed on pages with 'devel' in their titles

* Update docs/docsite/_themes/sphinx_rtd_theme/ansible_banner.html

* Only match paths at the beginning

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit 8313cc8fb1)
4 years ago
Sam Doran fba387fd64
[stable-2.9] Drop "rhui-" prefix from RHEL repositories in AMI (#71130) (#71132)
The repository names seem to have changed and no longer have the "rhui-" prefix.
(cherry picked from commit 6ac4439a6a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
David Shrewsbury c3ac896c16
Update 70762 changelog to use security_fixes (#71124) (#71128)
(cherry picked from commit 6bf1dd428b)
4 years ago
Baptiste Mille-Mathias 84afa8e90c
Fix missing quoting for remote_tmp in second mkdir of shell module. Issue #69577 (#69578) (#70758)
* Fix missing quoting for remote_tmp in second mkdir of shell module. Issue #69577

* adding changelog

* fixing typo in changelog entry

* adding test case

Adding test case written by bmillemayhias.

* using $HOME instead of ~

* fixing commit measage

* Update 69578-shell-remote_tmp-quoting.yaml

Co-authored-by: Brian Kohles <me@briankohles.com>
(cherry picked from commit 77d0effcc5)

Co-authored-by: Brian Kohles <briankohles@users.noreply.github.com>
4 years ago
Abhijeet Kasurde 76f591e64c
[2.9] debconf: add a note about no_log usage (#70754)
debconf module exposes sensitive information to logs, console.
Add a note to user about using no_log=True to hide such
information from console.

Fixes: #32386

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 84b4387702)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
Sam Doran 46a0e849ed
[stable-2.9] Handle Slackware OS version strings containing a plus (“+”) (#68142) (#70718)
A couple of years ago Slackware -current began using a plus (“+”) at the end of the distribution version string to indicate a future version work-in-progress.

Rearrange distribution_files unit tests to easily support more tests
  - add conftest with common fixtures
  - use parametrize for testing multiple scenarios

* Add changelog
* Add unit tests for Slackware distribution parsing
* Use correct fixtures for Slackware
Data comes from /etc/slackware-version

Co-authored-by: Sam Doran <sdoran@redhat.com>
Co-authored-by: <Eduard Rozenberg <eduardr@pobox.com>>.
(cherry picked from commit 566c5e6ce1)

Co-authored-by: Eduard Rozenberg <2648417+edrozenberg@users.noreply.github.com>

Co-authored-by: Eduard Rozenberg <2648417+edrozenberg@users.noreply.github.com>
4 years ago
Sviatoslav Sydorenko e5609db342
[backport][2.9][PR #70446] Refactor Python API examples and docs (#70851)
* Add boilerplate snippet into `examples/`

It is a partial backport of #70224

(partially cherry picked from commit 4816bb4f43)

* Refactor Python API examples and docs

PR #70446: it's a follow-up for #70445.

It includes a merge of `examples/scripts/uptime.py` and a similar
code snippet from `docs/docsite/rst/dev_guide/developing_api.rst`.

This patch also changes the docs RST file to include contents of
the example file instead of holding a copy of a similar code.

(cherry picked from commit 20bb915092)
4 years ago
Baptiste Mille-Mathias e55565e951
Create home and parent directories only when requested (#70789)
The home user and the parents directories should only be created when
create_home == True

(cherry picked from commit f3dd8d3052)
4 years ago
Abhijeet Kasurde 7833053223
[2.9] basic: use PollSelector implementation (#70801)
Some platform such as ESXi does not implement EpollSelector,
which is selected by DefaultSelector. Use PollSelector which is
based upon 'Poll' implementation. This works perfectly with
a platform like VMware ESXi.

Fixes: #70238

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 8cccede0d4)
4 years ago
Nathaniel Case f7aff6b888
[stable-2.9] Document existing ansi_re sequences and add `ESC[m` (#70683) (#70808)
* Document existing ansi_re sequences and add `ESC[m`

* Add changelog
(cherry picked from commit 06a4fc2)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
4 years ago
Sviatoslav Sydorenko 3fe5da947b
Fix the internal Python API usage examples (#70842)
Previous version initialized the `TaskQueueManager` after calling
`Play.load()` while advertising a way to inject a custom library
location path. This caused the tasks loader not to find any custom
modules because it was triggered before the path was actually added
to the module loader.

This patch changes the order of the operations to ensure that the
customized `context.CLIARGS` actually influences things.

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

(cherry picked from commit 8d97c8c222)
4 years ago
Abhijeet Kasurde 78592ffd68
profile_tasks: typecast result before slicing it (#70835)
Backport of https://github.com/ansible-collections/ansible.posix/pull/15

Fixes: #59059

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
4 years ago
David Shrewsbury 76815d3afc
Sanitize URI module keys with no_log values (#70762) (#70821)
* Add sanitize_keys() to module_utils.

* More robust tests

* Revert 69653 change

* Allow list or dict

* fix pep8

* Sanitize lists within dict values

* words

* First pass at uri module

* Fix insane sanity tests

* fix integration tests

* Add changelog

* Remove unit test introduced in 69653

* Add ignore_keys param

* Sanitize all-the-things

* Ignore '_ansible*' keys

* cleanup

* Use module.no_log_values

* Avoid deep recursion issues by using deferred removal structure.

* Nit cleanups

* Add doc blurb

* spelling

* ci_complete

(cherry picked from commit bf98f031f3)
4 years ago
Rick Elrod 3735d71b5e
Add ansible-releases@redhat.com to announce template (#70814)
Signed-off-by: Rick Elrod <rick@elrod.me>
4 years ago
Sam Doran 2a38a6cca6
[stable-2.9] reboot - fix Void Linux (#70704) (#70917)
Add entry for appropriate commands for Void Linux
(cherry picked from commit 4cc4cebc97)

Co-authored-by: fosslinux <fosslinux@aussies.space>
4 years ago
Bill Dodd 8870ea5b8c
fix error decoding Redfish response payloads on Python 3.5 (#70924) 4 years ago
Sam Doran 435d0feae1
[stable-2.9] lineinfile - fix broken exception handling (#70846) (#70945)
* prevent (ExceptionType) is not subscriptable errors
* tweak error message and use text conversion
* add to_text import
(cherry picked from commit 45c2eb6c0a)

Co-authored-by: nitzmahone <nitzmahone@users.noreply.github.com>

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
4 years ago