Commit Graph

52090 Commits (2f42779548dabef850a316e8be2452ddea93029d)
 

Author SHA1 Message Date
Dimitri Savineau 2f42779548
Update Ansible release version to v2.12.7rc1.post0. (#78045) 4 years ago
Dimitri Savineau 531123a311
New release v2.12.7rc1 (#78034) 4 years ago
Matt Clay fa3f74af91
[stable-2.12] Update AZP test container to 3.0.0. (#78023)
(cherry picked from commit 1321d6ecd5)
4 years ago
Matt Clay 117414e5c2
[stable-2.12] ansible-test - Adjust unit test mock usage. (#78003)
* ansible-test - Prefer unittest.mock for core.

(cherry picked from commit 81351022d8)

* ansible-test - Adjust unit test mock usage. (#77961)

(cherry picked from commit 23914d3f0b)
4 years ago
Matt Davis 482ce8fa8b
fix pip module resolution (#78000) (#78005)
* `importlib.util` appears to be lazily imported and is sometimes unavailable as an attribute of `importlib` without an explicit import

(cherry picked from commit 6e78425f8d)
4 years ago
Matt Clay 2cc9333e97
[stable-2.12] Make fuzzy plugin matching deterministic. (#77998)
(cherry picked from commit 5a0b230e24)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Sloane Hertel daf160bc67
Add toggle to fix module_defaults with module-as-redirected-action on a per-module basis (#77265) (#77900)
* If there is a platform specific handler, prefer the resolved module over the resolved action when loading module_defaults

Add a toggle for action plugins to prefer the resolved module when loading module_defaults

Allow moving away from modules intercepted as actions pattern

Fixes #77059

(cherry picked from commit 621e782ed0)
4 years ago
Felix Fontein f4d7f33513
Update PSF-license.txt to version from CPython 3.9.5. (#77805) (#77828)
(cherry picked from commit 201aba3d0f)
4 years ago
Sandra McCann 0eb8e5e571
stub out ipaddr page and point to new home (#77281) (#77939)
(cherry picked from commit dfda04894f)
4 years ago
Matt Clay 832a762c2b [stable-2.12] Avoid deprecated method in unit tests.
(cherry picked from commit 5f74350fd5)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
jamesmarshall24 f6b028341b
Update Ansible release version to v2.12.6.post0. (#77881) 4 years ago
jamesmarshall24 a1683d3dab
New release v2.12.6 (#77864) 4 years ago
Dimitri Savineau 04ab182ef9
Update Ansible release version to v2.12.6rc1.post0. (#77813) 4 years ago
Dimitri Savineau 01cbef9476
New release v2.12.6rc1 (#77810) 4 years ago
Sandra McCann 48689b63e4
update version switcher to include 2.13 (#77786) (#77796)
(cherry picked from commit f5642cea28)
4 years ago
Matt Davis 092d298b5c
fix SELinux facts tests (#77708)
* make the pre-flight sniffing more robust to different failure conditions (was failing on Ubuntu 22.04 VMs)
* remove skip aliases (the test needs to function everywhere to assert that the selinux facts bits behave properly when it's N/A)

(cherry picked from commit 4ff10fcd31)
4 years ago
Brian Coca a9f17d0532
dont rely on path to set config defs for plugins (#77659) (#77695)
(cherry picked from commit a3cc6a581e)
4 years ago
Sam Doran 4bde2d8a97
[stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602)
* [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576)

When looking up the `no_log` setting for a parameter that is an alias in
`AnsibleModule._log_invocation()`, the alias value will always be an
empty dictionary since `self.aliases` on the `AnsibleModule` instance is
never updated after initialization. Since the `no_log` setting is on the
canonical parameter not the alias, an incorrect warning is issued if the
parameter matches `PASSWORD_MATCH`.

This PR returns the aliases dictionary as an attribute of the
`ValidationResult` and updates the `aliases` attribute on the
`AnsibleModule` instance.
(cherry picked from commit 1b947eaf92)

Co-authored-by: Sam Doran <github@samdoran.com>

* Rewrite test comprehension for Python 2.6

* No need for list inside the dict constructor
4 years ago
Martin Krizek 625a99aa32
Prevent losing unsafe from lookups (#77609) (#77651)
This patch fixes a bug which under certain conditions results in data
returned from lookups not being marked as unsafe.

Each time Templar.do_template is invoked a new AnsibleContext is
created and stored effectively at two places:
1) as an instance variable in templar_obj.cur_context
2) as a local variable called new_context in do_template method of Templar

Due to custom functionality in Ansible's Context that allows for nested
templating it is possible that during resolving variable's value
template/do_template method is called recursively again, again creating
a new context. At that point the problem manifests itself because as
mentioned in 1) above the context is overwriten on the templar object
which means that any subsequent calls to _lookup will use the new
context to mark it as unsafe which is now different to the local
new_context which is used for testing for unsafe property.

The solution to the problem appears to be to restore the original
context inside do_template and also to eliminate the local variable
new_context to prevent problems in the future.

It appears that we don't have a better way of storing the context other
than as some form of global variable and so this appears to be the
"best" solution possible at this point. Hopefully data tagging will be
the solution here.

For more examples see unit and integration tests included in this patch.

Fixes #77535

(cherry picked from commit 3980eb8c09)
4 years ago
Brian Coca 013be12888
varaiblemanager, more efficienet vars file reads (#77570) (#77595)
(cherry picked from commit 2c2a204dc6)
4 years ago
Christian Adams b667639c2c
Update Ansible release version to v2.12.5.post0. (#77633) 4 years ago
Christian Adams b104478f17
New release v2.12.5 (#77628) 4 years ago
jamesmarshall24 3ea4cdaddf
Update Ansible release version to v2.12.5rc1.post0. (#77559) 4 years ago
jamesmarshall24 e3ee19fbb8
New release v2.12.5rc1 (#77543) 4 years ago
Sandra McCann fbc7502050
Pin antsibull to 0.42.0 (#77539) 4 years ago
Jordan Borean 04afeffed7
SID - Use literal UPN value when attempting a user to SID lookup (#77334) (#77348)
(cherry picked from commit ff184b0815)
4 years ago
Sloane Hertel db69d93c1c
[2.12] fix shell/command/script tasks skipping in check mode (#76353) (#77389)
* fix shell/command/script tasks skipping in check mode (#76353)

* fix shell/command/script tasks skipping in check mode

* changelog

(cherry picked from commit de11a1ce78)

* Add portion of tests from #76429 for skipping/not skipping shell/command tasks in check mode
4 years ago
Jordan Borean 374882e4df
winrm - ensure callers PATH for kinit is set (#77401) (#77403)
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation

(cherry picked from commit 60b4200bc6)
4 years ago
Abhijeet Kasurde 2ce5d99e83
[bp-2.12] hostname - fix TypeError in FileStrategy (#77365)
* Use file_get_content() to read the file containing the host name

(cherry picked from commit d60efd9768)

Signed-off-by: Emmanuel Benoît <tseeker@nocternity.net>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Emmanuel Benoît <tseeker@nocternity.net>
4 years ago
Sloane Hertel 8bbcfebd5c
Get git executable for collections in git repos (#77493) (#77501)
* Fix traceback installing collections from git repos if git is not installed

(cherry picked from commit 477c55b0d2)
4 years ago
Felix Fontein efbe050c29 [stable-2.12] Fix sanity test crash.
(cherry picked from commit 6216c9fc93)

Co-authored-by: Felix Fontein <felix@fontein.de>
4 years ago
Matt Clay de70bfbcb0 [stable-2.12] ansible-test - Fix origin host target filtering.
(cherry picked from commit 4b51e61645)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
jamesmarshall24 d8bc9c4056
Update Ansible release version to v2.12.4.post0. (#77380) 4 years ago
jamesmarshall24 bfd93c835a
New release v2.12.4 (#77374) 4 years ago
jamesmarshall24 36be99b52d
Update Ansible release version to v2.12.4rc1.post0. (#77332) 4 years ago
jamesmarshall24 5c97f7e16f
New release v2.12.4rc1 (#77329) 4 years ago
Felix Fontein 660e8fa07d
unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271) (#77311)
* Fix io_buffer_size option.

* Remove ignore.txt entry by adding action plugin only options to module's argument spec.

* Add changelog fragment.

* Adjust unit tests.

(cherry picked from commit e3c72230cd)
4 years ago
Martin Krizek 7ddf9c6bff
2.12: Add YAML representers for NativeJinjaUnsafeText and NativeJinjaText (#77299)
* Add a YAML representer for NativeJinjaUnsafeText (#76186)

(cherry picked from commit dd220ddc2f)

* Add a YAML representer for NativeJinjaText (#77282)

Fixes #77280

(cherry picked from commit c9db73f04e)
4 years ago
Elijah DeLee 26fd20c287
[2.12 backport] use same timeout for galaxy api interactions (backport of #77088) (#77142)
* use same timeout for galaxy api interactions (#77088)

Also, bump the default. A number of people have reported problems with
this 20 second timeout for a couple of years on
https://github.com/ansible/galaxy/issues/2302

It is mentioned in the issue that resolving dns can sometimes take up to
30 seconds, and that this timeout includes dns resolution.

Includes a changelog message

* fix type hint

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Sloane Hertel b3968340a0
[2.12] Fix collection redirects for filter and test plugins (#77210) (#77227)
* Fix collection redirects for filter and test plugins (#77210)

* Fix collection redirects for jinja2 filters/tests

* Handle recursive redirects

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

* The error message is only capitalized on 2.13. Make test more flexible.
4 years ago
Martin Krizek 17836f8e65
first_found: allow spaces in names (#77141) (#77207)
* first_found: allow spaces in names

Fixes #77136

(cherry picked from commit 74a204e6f1)
4 years ago
Tong He 2ff3ee75a5
[stable-2.12] Mention ansible-core RPM package in Ansible Core Installation Guide (backport #76801) (#77179) 4 years ago
Sloane Hertel bedff70f3e
[2.12] ansible-galaxy collection verify - display new files/dirs as modified content (#77128)
* Fix 'ansible-galaxy collection verify' to report files/directories not listed in the FILES.json

(cherry picked from commit a1d467dbb2)

* changelog

(cherry picked from commit 3d49d6f69e)
4 years ago
Matt Martz a45c4aadb8
[stable-2.12] Use full python package for ansiballz cache filenames (#77090) (#77125)
* Use full python package for ansiballz cache filenames

* Be a little more explicit about test goals
(cherry picked from commit 8cbe143)

Co-authored-by: Matt Martz <matt@sivel.net>
4 years ago
Matt Clay 2d98b94f6c [stable-2.12] ansible-test - Fix delegation inventory path.
(cherry picked from commit e8afdac06e)

Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Christian Adams a90ef30282
Update Ansible release version to v2.12.3.post0. (#77161) 4 years ago
Matt Clay b801ef15c9 [stable-2.12] Update setup_pexpect to prefer pip user installs.
This works around issues on RHEL 7.9 when an old version of pexpect is installed from an OS package.
(cherry picked from commit 27fe26edbf)

Co-authored-by: Matt Clay <matt@mystile.com>

ci_complete
4 years ago
Christian Adams 0ee3815c55
New release v2.12.3 (#77158) 4 years ago
Christian Adams 7efb3caf76
Update Ansible release version to v2.12.3rc1.post0. (#77131) 4 years ago
Christian Adams bcdde7ebe3
New release v2.12.3rc1 (#77124)
Signed-off-by: Christian M. Adams <chadams@redhat.com>
4 years ago