Commit Graph

53231 Commits (ba487253bb91f42b6385c0194ee2ccc387d3c499)
 

Author SHA1 Message Date
Brian Coca ba487253bb
password lookup, handle ident properly when saved (#80251) (#80310)
* password lookup, handle ident properly when saved (#80251)

* password lookup, handle ident properly when saved

  Currently we format and save ident when present but we didn't account for this when reading the saved file
  Also added some more robust error handling.

(cherry picked from commit 0fd88717c9)

* fix try block indent# https://chris.beams.io/posts/git-commit/

* clog

(cherry picked from commit 97c8da7783)

* fix bad merge indentation
2 years ago
Martin Krizek d5a36b8734
Change ansible_job_id format (#79951) (#80282)
* Change ansible_job_id format

...to be something that does not resemble float or other type which
value could be changed by literal_eval that jinja2_native uses.

Specifically the format of '%d.%d' is converted from str to float and
then back to float which may result in truncating the number resulting
in the job not being found because the job id does not exist.

(cherry picked from commit 09e0fb3516)
2 years ago
Matt Martz 8616d68ea9
[stable-2.14] ansible-galaxy collection install retry improvements (#80180) (#80274)
* clog frag

* Fix retries so that each explicit call to _call_galaxy is retried for the correct number of attempts. Fixes #80174

* Extend retry logic to common URL related connection errors. Fixes #80170

* Extend retries to downloading artifacts

* Extend param docs for change

* Rework the exception handling

* Don't be overly broad, reduce to TimeoutError, and BadStatusLine for now

* _download_file needs to raise AnsibleError.orig_exc

* Remove unused import

* Add IncompleteRead

* Add socket.timeout for py39

* Add 502 to retry codes

* Move http error code checking first

* Use itertools.tee to replay the backoff_iterator instead of using a callable

* Actually set a CLI default of 60s for timeout, to prevent implicit galaxy from using 10s as default from Request.open

* Import typing

* fix type hints

* Use http.HTTPStatus instead of int HTTP error codes where feasible

* Split exception handling



* Add missing import

---------


(cherry picked from commit 2ae013667e)

[stable-2.14] ansible-galaxy collection install retry improvements (#80180)

* clog frag

* Fix retries so that each explicit call to _call_galaxy is retried for the correct number of attempts. Fixes #80174

* Extend retry logic to common URL related connection errors. Fixes #80170

* Extend retries to downloading artifacts

* Extend param docs for change

* Rework the exception handling

* Don't be overly broad, reduce to TimeoutError, and BadStatusLine for now

* _download_file needs to raise AnsibleError.orig_exc

* Remove unused import

* Add IncompleteRead

* Add socket.timeout for py39

* Add 502 to retry codes

* Move http error code checking first

* Use itertools.tee to replay the backoff_iterator instead of using a callable

* Actually set a CLI default of 60s for timeout, to prevent implicit galaxy from using 10s as default from Request.open

* Import typing

* fix type hints

* Use http.HTTPStatus instead of int HTTP error codes where feasible

* Split exception handling



* Add missing import

---------

.
(cherry picked from commit 2ae013667e)
2 years ago
Sloane Hertel 62a353c085
fix using templated values for include/import role FA (#80320) (#80378)
* fix using templated values for include/import role options 'public', 'allow_duplicates', and 'rolespec_validate'

* pass templated values without changing the instance

* Fix templating by setting always_post_validate to True and calling IncludeRole.post_validate() instead

ci_complete

* add changelog

(cherry picked from commit 666188892e)
2 years ago
Jordan Borean 495d48d51e
Ansible.Basic - Improve temporary file cleanup process (#80293) (#80324)
* Ansible.Basic - Improve temporary file cleanup process

* Add comment on struct value used

(cherry picked from commit ba4505f5cb)
2 years ago
Jordan Borean 7da4a99239
Improve Ansible.Basic.cs tempdir uniqueness (#80328) (#80331)
* Improve Ansible.Basic.cs tempdir uniqueness

The current tempdir naming scheme can result in the same name if the
remote worker starts at the same time as another. By using the process
id it should add enough uniqueness to avoid this situation.

* Fix sanity issues

* Fix up compile issue on older hosts

(cherry picked from commit fb6b90fe42)
2 years ago
Matt Martz 0f1c165196
[stable-2.14] --syntax-check is only applicable to ansible-playbook. Fixes #80506 (#80507) (#80510)
(cherry picked from commit f3774ae)
2 years ago
Matt Clay 5d8fa14a7b
[stable-2.14] pep517 backend - Use correct import_module import (#80480) (#80502)
(cherry picked from commit e87802cf2c)
2 years ago
Sloane Hertel 4aa682003d
Fetch signatures from galaxy after the dependency resolver runs (#80334) (#80398)
Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking.

Reduce the verbosity to `-vvvv` (to match other Galaxy API calls) to see this activity.

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit 460abe0cef)
2 years ago
Matt Clay c4b33c7ce8
[stable-2.14] ansible-test - Add support for argcomplete 3 (#80482) (#80485)
(cherry picked from commit 0371ea08d6)
2 years ago
Matt Clay fb76b9e8a4
[stable-2.14] ansible-test - Fix packaging change classification (#80360) (#80361)
(cherry picked from commit 5d64024f1a)
2 years ago
Sandra McCann 6d64021d7b
Backportapalooza 03 29 (#80350)
* Update special_variables.rst (#80210)

The usage of a glossary on this page will allow linking to a specific special variable, like on the glossary page, e.g.: https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Idempotency

(cherry picked from commit 1491ec8019)

* uri: improve force_basic_auth documentation (#80211)

Add more details about what "true" and "false" mean for the
force_basic_auth setting. Give example scenarios when clients may want
to use this setting.

(cherry picked from commit fc8203168e)

* Improve dirname and basename filter doc (#80054)

(cherry picked from commit 93beef053e)

* Move Collection requirements to ansible/ansible (#80234)

(cherry picked from commit cba3952434)

* Add Ansible community 7.4.0 porting guide (#80338)

(cherry picked from commit 29e0a68af2)

* Add antsibull-changelog and antsibull-docs to other tools and programs page. (#80340)

(cherry picked from commit cf44c84396)

---------

Co-authored-by: Benoît Geeraerts <10222438+b-enoit-be@users.noreply.github.com>
Co-authored-by: Ken Dreyer <kdreyer@redhat.com>
Co-authored-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Co-authored-by: Anwesha Das <anwesha@das.community>
Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Felix Fontein 08297ce0db
[2.14] ansible-doc: fix broken seealso links in text output (#80285)
* ansible-doc: fix broken seealso links in text output (#80280)

* Fix broken URLs.

* Also remove auto-generated description for modules outside ansible.builtin.

(cherry picked from commit fafb23094e)

* Fix URL processing. (#80295)

(cherry picked from commit 086ae42209)
2 years ago
Matt Clay 17ca4169da
[stable-2.14] New upstream release tool (#80179) (#80321)
(cherry picked from commit a6bfa82bd0)
2 years ago
Matt Clay 60b0bcbf52
[stable-2.14] Use variable instead of container resource in AZP (#80299) (#80316)
(cherry picked from commit 93d0253292)
2 years ago
Matt Martz a2497af802
Update Ansible release version to v2.14.4.post0. (#80314) 2 years ago
Matt Martz 90ba582e3e
New release v2.14.4 (#80313) 2 years ago
Matt Clay 7bb078bd74
[stable-2.14] Fix url lookup test to use test container (#80284) (#80287)
(cherry picked from commit 054aa92158)
2 years ago
Matt Davis 1b981d3fba
Update Ansible release version to v2.14.4rc1.post0. (#80266) 2 years ago
Matt Davis fca15bb07e
New release v2.14.4rc1 (#80265) 2 years ago
Matt Clay 9f723d7123
[stable-2.14] 📦 Switch sdist build-system to pure setuptools (#80255) (#80261)
* [stable-2.14] 📦 Switch sdist build-system to pure setuptools (#80255)

This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this will make sure not to modify the current
source checkout on that first build.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 7097df3eed)

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>

* Make PEP 517 mutation tests use pinned old setuptools (#80262)

* Pin setuptools to lowest supported @ PEP 517 test

This allows catching the behavior of builds under old setuptools.

* Stop invoking `setup.py install` in tests

This is not the part we care about since it involves dealing with the
external runtime dependencies rather than building our source
distribution.

(cherry picked from commit eebfd71a6d)

---------

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2 years ago
Sviatoslav Sydorenko 1f48032437 [stable-2.14] Make isolated source changes @ PEP 517 backend (#80253)
(cherry picked from commit 888abf5d6e)

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2 years ago
Martin Krizek ddbad58428
Use FAs with inheritance only when applicable (#80026) (#80076)
... and set default value of an attribute on an object
only in NonInheritableFA.

Fixes #79777

ci_complete

(cherry picked from commit 6c3d2a4e51)
2 years ago
Martin Krizek dcad473afc
Avoid redundant unsafe wrapping in ansible_eval_concat (#80143) (#80162)
The wrap_var is done in do_template for all concat functions after their
return.

(cherry picked from commit 694f12d01b)
2 years ago
Sloane Hertel 1d3800a8d7
copy - fix check mode with remote_src=True (#78624) (#80176)
* Don't create dest directory in check mode

uncomment existing test

Fix checking for file attribute changes in check mode and add a test

(cherry picked from commit b7a0e0d792)
2 years ago
Sloane Hertel 28c9d93fe0
ansible-galaxy role info - fix unhandled AttributeError (#80187)
* catch GalaxyError instead of its base class to ensure it will have a http_error attribute

(cherry picked from commit 6165dfea40)
2 years ago
Sandra McCann 24f40b44ae
Backportapalooza 03 16 (#80246)
* improve doc dependency install steps (#80120)

(cherry picked from commit 352010f9c3)

* docs: automatic `always` tag in gather_facts (#80052)

(cherry picked from commit 3216e071c7)

* docsite requirements path (#80134)

(cherry picked from commit 1055803c3a)

* Adjust release schedule docs to four weeks (#80166)

(cherry picked from commit 7ce951ff48)

* Fix spelling and grammar in subelements filter doc (#80137)

(cherry picked from commit 12c1891ce6)

* Fixed typo (#80184)

`uvault` should be `unvault`

(cherry picked from commit cb2180e286)

* Document debugging conditionals (#80239)

##### SUMMARY
Add a section to the docs describing how to debug conditional statements - how to get Ansible to show you whether your `when:` clause evaluates to `true` or `false`.

I ran into trouble with this and couldn't find anything in the docs. Thought I'd add it.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

(cherry picked from commit 507fd1bd60)

* Update connection.rst (#80194)

(cherry picked from commit 0937cc4862)

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
Co-authored-by: Jairo Llopis <973709+yajo@users.noreply.github.com>
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
Co-authored-by: Zachary Peschke <8718570+zpeschke@users.noreply.github.com>
Co-authored-by: Harmdhast <pandemonium.harmdhast@gmail.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Esther Christopher <estheradamuchris@gmail.com>
2 years ago
Sviatoslav Sydorenko 913db09fbb
[backport-2.14] 🎨 Convert RST to manpage in-memory @ PEP 517 (#80237)
* Add _convert_rst_in_template_to_manpage arg types

* 📦 Make manpage build dependencies conditional

Previously, said dependencies were declared as unconditionally
required even when manpages not needed to be built. This patch
Makes it so they are only required when needed.

* Correct _generate_rst_in_templates returned type

It was marked as Path before this patch but in fact, it's iterable of
paths.

* 🎨 Convert RST to manpage in-memory @ PEP 517

Previously, the automation was writing a temporary templated RST on
disk and calling a helper CLI script on that. But with this change, it
happens with less unnecessary I/O.

Co-Authored-By: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* 📦Expose sdist manpage build deps unconditionally

Due to a bug in pypa/build, the `get_requires_for_build_sdist()` hook
is always invoked with `config_settings=None`. This means that we
cannot conditionally extend build requirements in said hook.

As a workaround, this patch makes hook pretend that `--built-manpages`
is always passed.

Ref: https://github.com/pypa/build/issues/559.

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
(cherry picked from commit 67bafafbc0)

This is a backport of #80098.
2 years ago
Matt Clay 86ebd55a3c [stable-2.14] ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP..
(cherry picked from commit bad8843124)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 4461de15de [stable-2.14] Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
(cherry picked from commit f47bc03599)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay bea9a2acf7 [stable-2.14] ansible-test - Remove pointless comparison (#80168)
(cherry picked from commit 31658031ed)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 4a3f5b7167 [stable-2.14] ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
(cherry picked from commit 6bfe6b899a)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay 7b21457d58 [stable-2.14] ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
(cherry picked from commit 5e3db6e441)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay b1199e6a46 [stable-2.14] ansible-test - Allow target prefixes to use `_` (#80021)
Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character.
(cherry picked from commit e6cffce0eb)

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay d36f52614d
[stable-2.14] ansible-test - Improve code formatting (#79983) (#80206)
* ansible-test - Add blank lines after docstrings

* ansible-test - Preserve formatting of arg pairs

* ansible-test - Remove unused string

* ansible-test - Remove pointless dict() usage

* ansible-test - Clean up initial func arg indenting

* ansible-test - Clean up constructor arg indenting

* ansible-test - Clean up func arg wrapping

* ansible-test - Clean up comma and paren placement
(cherry picked from commit 715ab99462)
2 years ago
Matt Clay ff91a95ef1
[stable-2.14] ansible-test - Fix file permissions for delegation (#80203)
* [stable-2.14] ansible-test - Fix file permissions for delegation (#79932)

* ansible-test - Fix file permissions for delegation

* Set more restrictive permissions for SSH key

* Check all execute bits, not just owner

* Add a breaking_changes changelog entry
(cherry picked from commit c8c1402)

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

* ansible-test - Fix collection delegation (#79947)

(cherry picked from commit 0793833847)

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Yanis Guenane 57cd9447fe
Updating Japanese translation (#80161) 2 years ago
Sviatoslav Sydorenko bfc26f55cc
[backport-2.14] 📦 Integrate manpage builds into PEP 517 build backend (#80129)
This patch creates a thin wrapper around the `setuptools`' PEP 517
build backend in-tree. It features an ability to request generating
the manpage files in the process of building a source distribution.
This toggle is implemented using the `config_settings` mechanism of
PEP 517.
One must explicitly pass it a CLI option to the build front-end to
trigger said behavior. The packagers are expected to use the
following call:

    python -m build --config-setting=--build-manpages

This option has no effect on building wheels.

🧪 The change includes integration tests

This test runs building and re-building sdists and wheels with and
without the `--build-manpages` config setting under the
oldest-supported and new `setuptools` pinned.

It is intended to preserve the interoperability of the packaging setup
across Python runtimes.

An extra smoke test also verifies that non PEP 517 interfaces remain functional.

PR #79606

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 56036013cd)
2 years ago
Matt Clay 6be77608c6
[stable-2.14] ansible-test - Fix pylint error with old home dir (#80151) (#80152)
* [stable-2.14] ansible-test - Fix pylint error with old home dir (#80151)
(cherry picked from commit 27287b40c0)

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

* ansible-test - Fix error with missing pylint home (#80155)

(cherry picked from commit 367d45facd)
2 years ago
Matt Clay d8d2005096
[stable-2.14] Fix MANIFEST.in includes (#80147) (#80148)
(cherry picked from commit 7c62cdeecd)
2 years ago
Sandra McCann 162345a77a
Backportapalooza 03 02 (#80127)
* Add Steampunk Spotter to Other tools list (#80006)

(cherry picked from commit 122de95d85)

* Clarify combine filter examples (#80078)

(cherry picked from commit 39fd899d83)

* Add Ansible community 7.3.0 porting guide (#80106)

(cherry picked from commit dbcaab1012)

* Clarify when plugin settings are being populated (#79710)

(cherry picked from commit 998b5c1a06)

* Update playbooks_tests.rst (#79788)

(cherry picked from commit ed879954f9)

* consistent booleans for page text and code blocks (#80036)

* consistent booleans for page text and code blocks

* Update check_mode from n to false

(cherry picked from commit 940fdf5dba)

* Update collection_integration_updating.rst (#80037)

(cherry picked from commit ce5471fc9f)

* package_facts requires python-rpm on SUSE systems in ansible 2.12.1 (#80041)

(cherry picked from commit 43aa47c2af)

* fix: jinja complex type transforms doesn't work as documented (#80067)

jinja complex type transforms: dict(somelist| slice(2)) doesn't work as documented. Changed the example to use zip_longest

(cherry picked from commit 5ad77fc7bb)

* Docs: Clarify note on tags (#80079)

The current wording could be read as "tasks that are tagged *both* configuration and packages" while in fact it is "tasks that are tagged *either* configuration *or* packages"

(cherry picked from commit 563833d124)

* Fix typo docs in playbooks_tags.rst (#80117)

(cherry picked from commit c8f740cfee)

* Encourage true/false for module documentation (#80060)

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 02c49ffe60)

* fix link for development guidelines (#80055)

(cherry picked from commit 012393e2cd)

* improve password lookup syntax in examples (#80092)

(cherry picked from commit 809727a7c7)

* Fixing typos (#80045)

(cherry picked from commit 841b71c94f)

* clarify  playbook tests (#80073)

(cherry picked from commit 0521184337)

* Update playbooks_conditionals.rst (#80062)

"changed" was missing from the docs

(cherry picked from commit cc8e6d06d0)

---------

Co-authored-by: Anže Luzar <aluzarwork@gmail.com>
Co-authored-by: Klaus Frank <agowa338@users.noreply.github.com>
Co-authored-by: Anwesha Das <anwesha@das.community>
Co-authored-by: nkakouros <tterranigma@gmail.com>
Co-authored-by: Gijikiki <61326640+Gijikiki@users.noreply.github.com>
Co-authored-by: Aastha Varma <aastha.code@gmail.com>
Co-authored-by: Player256 <92082372+Player256@users.noreply.github.com>
Co-authored-by: Desmond Obisi <51109125+DesmondSanctity@users.noreply.github.com>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Co-authored-by: Nicolas P <0kyn.dev@gmail.com>
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
Co-authored-by: Akira Yokochi <akira6592@gmail.com>
Co-authored-by: Andreas Deininger <andreas@deininger.net>
Co-authored-by: Keeper-of-the-Keys <es.rosenberg+github@gmail.com>
2 years ago
Matt Martz 0c2dd3eed3
[stable-2.14] Do not use hardcoded httpbin.org in uri tests (#80101) (#80102)
(cherry picked from commit 060a27f)
2 years ago
jamesmarshall24 1c1f3171bb
Update Ansible release version to v2.14.3.post0. (#80100) 2 years ago
jamesmarshall24 893d01b5c6
New release v2.14.3 (#80083) 2 years ago
jamesmarshall24 88a7738127
Update Ansible release version to v2.14.3rc1.post0. (#80044) 2 years ago
jamesmarshall24 ce6ed1653f
New release v2.14.3rc1 (#80029) 2 years ago
Sandra McCann da131ec48b
Backportapalooza 02 16 (#80019)
* fixes typo in Ansible 7 roadmap (#79996)

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit 75274021d3)

* update banner' (#79971)

(cherry picked from commit f841c2803a)

---------

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2 years ago
Brian Coca 58d66a7568
strategy fix invalid variables being registered (#79706) (#79818)
also added tests for normal and bad cases

(cherry picked from commit 281474e809)
2 years ago
Martin Krizek 02d9336b32
Make using blocks as handlers a parser error (#79993) (#80010)
Fixes #79968

(cherry picked from commit bd329dc543)
2 years ago
Matt Davis a082726ef2
[2.14] don't ignore templated _raw_params that k=v parser failed to parse (#79913) (#79964)
* don't ignore templated _raw_params that k=v parser failed to parse (#79913)

fixes #79862

(cherry picked from commit e1d298ed61)

* backport test change to runme.sh
2 years ago