* uri: fixed search for json types to include strings in the format xxx/yyy+json
(cherry picked from commit 0c7361d)
Co-authored-by: Brent Barbachem <barbacbd@dukes.jmu.edu>
* Fix installing signed collections by using the fqcn, version, source, and type as a unique identifier.
Define __hash__ and __eq__ methods to handle Candidate/Requirement comparison excluding signatures which aren't fully populated until install time.
* Remove PinnedCandidateRequests since it is redundant now.
* Fix verifying against a signed remote when the keyring isn't configured
(cherry picked from commit d5e2e7a0a8)
Instead of using Templar.environment in Templar.do_template for
accessing/mutating the environment, myenv local variable should be used
because it is the environment used for actual templating. It can either
point to Templar.environment or newly created environment overlay.
Fixes#80605
(cherry picked from commit 8cd95a8e66)
* 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
* 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)
* 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)
* 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)
* 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)
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)
* 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>
* 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)
* 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>
* 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>
* 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
* add null 'manifest' key to metadata for git repo collections containing MANIFEST.json
changelog
* set to Sentinel instead of None
* Test installing a collection in a git repo that contains a MANIFEST.json
* fix test
* Update changelogs/fragments/ansible-galaxy-install-git-src-manifest.yml
(cherry picked from commit 321848e98d)
* [Docs] add easyfix/good first issue/docs links (#79830)
(cherry picked from commit 722fc05c31)
* [Docs] add doc links to documentation_contributions.rst (#79840)
(cherry picked from commit 58f0950638)
* Remove dev_guide stubs (#79795)
* Remove dev_guide stubs
* Remove Cisco ACI Dev Guide
(cherry picked from commit 10f0e5f6d4)
* maintainers_guidelines.rst: add a link to collection release guidelines (#79859)
(cherry picked from commit fa382670dc)
* Mentions 'meta: flush_handlers' task (#79542)
(cherry picked from commit d8dc76e134)
* Description for changing User ID to match user value (#79470)
(cherry picked from commit 913e4863af)
* Remove irrelevant line (#79865)
Remove irrelevant comment line form example code
(cherry picked from commit 1c01eab3fb)
---------
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Mario Lenz <m@riolenz.de>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: JaroslavKlech <klechh@gmail.com>
Co-authored-by: Tabah Baridule M <dulemartins07@gmail.com>
Co-authored-by: Konrad Gawda <konrad.gawda.opensource@gmail.com>
* fix filename for sidecar docs (#79779)
(cherry picked from commit f2707d1fbc)
* correct examples to use removed_from_collection not collection_name (#79803)
(cherry picked from commit 7ab3de7ee8)
* Fix: documentation for per-task timeout (#79715)
(cherry picked from commit 48e6bf8d27)
* [Docs] maintainers_guidelines: add WG and real-time chat request info (#79750)
(cherry picked from commit 6cb6d655b3)
* doc fix for platform content #79794 (#79801)
(cherry picked from commit d7a4152851)
* Expand docs for the import sanity test. (#79768)
* Expand docs for the import sanity test.
* Remove note about Python 2.7 compat.
It should not be needed since there is a sanity test to enforce use of `__metaclass__ = type`.
* Improve introductory paragraph.
* Fix link typo.
(cherry picked from commit 2164d5699c)
* docs: Extend password entry of ansible.builtin.user (#79694)
* docs: Extend password entry of ansible.builtin.user
Clarify that `password` sets the password hash.
Not the actual password.
Fixes part of #79684
(cherry picked from commit 6cd1a1404a)
* Update dev_guide.rst (#79625)
(cherry picked from commit 65eb5c0a9f)
* Improve documentation on requirements.yml (#76140)
Makes it clear that user can use range identifiers with collection
versions inside requirements.yml files.
(cherry picked from commit 44dcfde9b8)
---------
Co-authored-by: Evgeni Golov <evgeni@golov.de>
Co-authored-by: Jo <jo@swagspace.org>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: prasadpatil49 <51715670+prasadpatil49@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
Co-authored-by: Jens Timmerman <github@caret.be>
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
* Update authentication.rst (#79623)
(cherry picked from commit e7af7532bd)
* Fix typo (#79641)
(cherry picked from commit 8e7cc371be)
* correct the mistake of example repeat_original (#79659)
there is a little mistake
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
(cherry picked from commit 6f8c1da0c8)
* switched reference from katacoda to instruqt (#79698)
(cherry picked from commit 0fc932fda0)
* contributor_path: fix typos (#79678)
(cherry picked from commit fe7d488a1b)
* Fix broken reference to FAQ (#79621)
(cherry picked from commit 602824db1d)
* Docsite: add Security Automation Working Group to Communication guide (#79692)
(cherry picked from commit 65efa4b97f)
* Docsite: remove dead Lockdown Working Group from Communication guide (#79693)
(cherry picked from commit 55f9d7f71f)
* Fix `undef()` example to a valid Jinja template (#79701)
(cherry picked from commit e41d2874a6)
* Truthy value should be one of false or true (#79730)
Otherwise ansible-lint complains: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy
(cherry picked from commit b756a08d89)
* Fix regex filter docs (#79736)
* Fix notes in regex_replace doc
The documentation says that this maps to 'regex.replace' when it should say 're.replace'. The distinction is important because of the third-party 'regex' module that has more features than the built-in 're' module. https://pypi.org/project/regex/
* Fix notes in re.search docs
The documentation says that this maps to 'regex.search' when it should say 're.search'. The distinction is important because of the third-party 'regex' module that has more features than the built-in 're' module. https://pypi.org/project/regex/
(cherry picked from commit cf50d8131f)
* complex_data_manipulation.rst: fix typo (#79758)
(cherry picked from commit b5b7f9bce2)
* Fix broken link for inventory script examples (#79762)
These scripts were removed from community.general in https://github.com/ansible-collections/community.general/pull/2696 and moved to ansible-community/contrib-scripts per https://github.com/ansible-community/community-topics/issues/16#issuecomment-853317111
(cherry picked from commit 97993eeb10)
* communication.rst: improve (#79751)
(cherry picked from commit 11a27eefa2)
* Fix broken docs links. (#79769)
(cherry picked from commit 5d71ace583)
Co-authored-by: Gineesh Madapparambath <net.gini@gmail.com>
Co-authored-by: Kristopher Henry Kram <kristopher@kristopherkram.com>
Co-authored-by: evangelionlion <546620084@qq.com>
Co-authored-by: Deric Crago <deric.crago@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Rune Juhl Jacobsen <rune@juhljacobsen.dk>
Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
Co-authored-by: antonc42 <antonc42@users.noreply.github.com>
Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com>
Co-authored-by: Matt Clay <matt@mystile.com>
* Normalize deprecation records.
* Fix alias deprecations in suboptions.
* Report in which option an alias warning happened for suboptions.
* Add deprecation tests for suboptions.
* Also test deprecation in list of dicts.
* Adjust unit tests for toplevel alias deprecation field name change.
(cherry picked from commit 8a7185c224)
* Ensure we are passing ciphers to all url_get calls. Fixes#79717
* Add clog frag
* Fix tests
(cherry picked from commit 2143bcd)
Co-authored-by: Matt Martz <matt@sivel.net>
Fix ignoring certs when downloading tarballs
Fix ignoring certs when downloading a collection from a specific source that isn't in the configured servers list
(cherry picked from commit acbf4cc60e)
* Fix file touch check mode result (#79360) (#79422)
Fixes#79360
(cherry picked from commit 3936b5c471)
* Rename changelog fragment according to PR number
* local connection: avoid tb when running in container with invalid user
* clog
* cannot use uid, leave empty and ~/ will resolve itself
* get back to what it did
(cherry picked from commit 5f3a6b78db)
* background threads writing to stdout/stderr can cause children to deadlock if a thread in the parent holds the internal lock on the BufferedWriter wrapper
* prevent writes to std handles during fork by monkeypatching stdout/stderr during display startup to require a mutex lock with fork(); this ensures no background threads can hold the lock during a fork operation
* add integration test that fails reliably on Linux without this fix
(cherry picked from commit 1424484be0)
as chmod/mode is not the only thing we attempt and Ubuntu not shipping acl
in newer versions can lead to some confusion
fixes#79146
(cherry picked from commit 0f18ddca9f)
* ansible-galaxy install - fix unnecessary api check when installing a role from git repo (#79090)
* delay server api evaluation until a GalaxyRole needs to make an api call for info, list, and install
(cherry picked from commit cb2e434dd2)
* Fix isinstance check (#79159)
Use GalaxyAPI for isinstance check instead of RoleDistributionServer, since the latter is defined in __main__ sometimes (when running integration tests or ansible-galaxy from source) and importing from ansible.cli.galaxy won't reference the same object.
(cherry picked from commit 89d682464b)
* add ansible 7 porting guide to index page (#79254)
(cherry picked from commit 44f7ca4645)
* communication.rst: add Ansible MySQL WG information (#79269)
(cherry picked from commit 1c80209422)
* #59449: Removes translatable words from code blocks (#79193)
Co-authored-by: Jaroslav Klech <jklech@redhat.com>
(cherry picked from commit 65e725f08f)
* Add more documentation for InventoryData methods (#79288)
* Add more documentation for InventoryData methods
Reword some constructed documention and mention fetch_hostvars
* describe use cases for default strict behavior
Co-Authored-By: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
(cherry picked from commit a12a9b409f)
* blockinfile - document multiline marker behavior (#79292)
(cherry picked from commit f700047e69)
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: JaroslavKlech <klechh@gmail.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* Don't assume column index for netmask and broadcast. Fixes#79117
* fix typo
(cherry picked from commit f53dbf9)
Co-authored-by: Matt Martz <matt@sivel.net>
* [stable-2.14] Ensure that we do not squash keywords in validate (#79049)
* Ensure that we do not squash keywords in validate. Fixes#79021
* become_user: nobody should only apply to the test tasks, not the setup_test_user role
* Update how become_user is specified
* Add test to ensure keyword inheritance is working for become
* Add clog frag
* Cache fattributes to prevent re-calculation
* ci_complete
* Remove unnecessary getattr.
(cherry picked from commit 420564c5bc)
Co-authored-by: Matt Martz <matt@sivel.net>
* Remove unneeded merge conflict changes