Commit Graph
51887 Commits
Author SHA1 Message Date
Matt Clay 94410789d1 ansible-test - Add --prime-venvs option. 2021-09-21 00:03:33 -07:00
Matt ClayandGitHub 178a67fd40 ansible-test - Add support for windows/2022 (#75743)
ci_complete
2021-09-21 13:51:13 +10:00
Matt ClayandGitHub 4ea8d9a782 ansible-test - split controller/target testing (#75605) 2021-09-20 18:39:07 -07:00
989eeb243f Add an undef global Jinja function (#75435)
* add tests for fail filter

also tests that fail does not block inspectability

* add fail filter

fallback message is a bit clunky,
since you can't invoke a filter without specifying an input.
That is, "{{ fail }}" doesn't work,
so you have to do "{{ None | fail }}"

* document 'fail' filter

* add changelog fragment

* fail filter uses default message on Undefined or emptystring

makes it slightly easier to use the default message:
```diff
- "{{ None | fail }}"
+ "{{ '' | fail }}"
```

and the user sees a slightly more relevant message
if the message itself is undefined:

```diff
- The error was: {{ failmsg | fail }}: 'failmsg' is undefined
+ The error was: {{ failmsg | fail }}: Mandatory variable has not been overridden
```

* rebuild as the builtin `Undefined`

* harmonise `hint` parameter for make_undefined with jinja

* use code block for documentation item

[ref](https://github.com/ansible/ansible/pull/75435#discussion_r707661035)

* rename to `undef` to expose less Python into the Jinja

[ref](https://github.com/ansible/ansible/pull/75435#pullrequestreview-757799031)

* explicitly instantiate undefined value now that it's possible

see I knew we would break something with reflection

* preserve test coverage of undefined variable

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2021-09-20 15:37:36 -07:00
47b644570f facts: Add uptime fact for FreeBSD and Darwin (#75432)
This is a bit more complicated than on OpenBSD/NetBSD.

The code is inspired in part from https://github.com/Cairnarvon/uptime

Tested on the GCC compile farm: https://cfarm.tetaneutral.net/

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-09-20 16:57:52 +02:00
Rick ElrodandGitHub 61f5c22551 Remove (only) user-facing use of ANSIBLE_ASYNC_DIR (#74249)
Change:
- Remove only user-facing use of ANSIBLE_ASYNC_DIR.
- Remove two comments saying to change things that, apparently, we
  aren't going to change...

Test Plan:
- ci_complete

Tickets:
- Fixes #74139
- Fixes #74138
- Refs #74226

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-09-17 14:58:17 -05:00
1353678f23 Enable ansible-galaxy to specify client id override with Keycloak Token (#75601)
* Enable ansible-galaxy to specify client id override with Keycloak Token

* Specify ability to provide override of client_id

* Test client_id can be configured for individual servers

* Add issue link to changelog

* Document client_id as a config option and add an example

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2021-09-17 12:10:10 -07:00
Matt ClayandGitHub 54a795896a Integration test and sanity index generation fixes. (#75731)
* Fix test usage of `which python`.

Also use `command -v` instead of `which` where needed.

* Fix testing_formatter.sh file checking.

The index is longer expected to exist when generating it.
The generation script is run with `set -eux`.
2021-09-17 11:05:19 -07:00
Matt Clay b281f84bc4 Ignore support code in update-bundled test. 2021-09-17 10:42:30 -07:00
Sloane HertelandGitHub 45459346ed Document diff mode support for apt_repository and cron (#75709) 2021-09-17 11:19:47 -04:00
Sloane HertelandGitHub f0d43cfffc Document validate_certs option for Galaxy server configuration (#75728)
Added in #75710
2021-09-17 10:58:31 -04:00
Aine RiordanandGitHub 2346f93961 Docs: Fix section header notation in Style Guide (#75720) 2021-09-17 10:55:05 -04:00
Aine RiordanandGitHub 17122edfc5 Docs: Fix section header notation in Developer Guide (#75721) 2021-09-17 10:52:46 -04:00
8dc5516c83 getent, fix returning mulitple results for key (#75620)
* getent, fix returning multiple results for key
* added return docs

Co-authored-by: flowerysong <junk+github@flowerysong.com>
2021-09-17 10:09:40 -04:00
Jordan BoreanandGitHub 097bc07b66 PowerShell - Ignore LIB env var when building C# code (#75698)
* PowerShell - Ignore environment variables when building C# code

* Just unset LIB for now

* Fix sanity issue
2021-09-17 08:07:40 +10:00
Sam DoranandGitHub a11bb8b4d3 Revert "user - consistently create user home directory on Linux (#71952)" (#75704)
This reverts commit 2f7e0b8489.
2021-09-16 12:05:32 -07:00
Sloane HertelandGitHub 72ba2bdc82 ansible-galaxy - add a per-server validate_certs option (#75710)
* Add a validate_certs option to galaxy server configuration

* Add a unit test for cert validation

* changelog
2021-09-16 13:54:52 -04:00
maulikdandGitHub 9558f53a58 Fix git submodules path issue (#75655)
* Fix git path used for submodules

* Fix git submodules integration test
2021-09-16 09:46:50 -04:00
Aine RiordanandGitHub 3d081b6ca5 Docs: Edit list of locations to search for roles (#75703)
* Docs: Add playbook base dir to roles search

* Docs: Add link to default roles path
2021-09-16 06:42:14 -07:00
c3fc8fb99a apt module: add option to allow package downgrades (#74852)
* apt module: add option to allow package downgrades

* Add new option to module so users don't have to force downgrades which
  is insecure and dangerous

* Add integration tests similar to upgrade integration tests

* Changelog

* Update changelog fragment

* Update changelogs/fragments/74852-apt-allow-downgrade.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update lib/ansible/modules/apt.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update lib/ansible/modules/apt.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-09-14 17:46:56 +02:00
Jon PughandGitHub b1527dcf63 Small typo in vars plugin example. (#75702) 2021-09-14 10:18:04 -05:00
Matt MartzandGitHub 208014422d Fix markdown links that were errantly formatted as rst (#75697) 2021-09-14 10:15:37 -05:00
Brian CocaandGitHub 3d83c325dd Fix metadump (#75668)
* ensure dump produces json

* clog and tests

* remove library additions since they are not usable

* avoid any/all dirs

* ensure we dont use local dir as playbookdir
2021-09-14 10:05:21 -05:00
469b559ebe Try all galaxy servers when locating available versions for a collection (#75468)
* If an exception occurs when getting a collection's metadata, continue to the next in the server list.

* Warn for unknown exceptions when finding versions of a collection

* Test that an invalid server is no longer fatal if a subsequent server has the collection

* Fix server for verify tests - compare checksums against the server from which it was installed

* Add tests for verify and fix that code path to mirror install/download behavior for server errors

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-09-14 09:40:48 -04:00
Aine RiordanandGitHub 01f0c38aa5 Docs: Update cross reference tag syntax in User Guide (#75693) 2021-09-13 10:19:48 -04:00
devon-marandGitHub 3e7a622204 Fix unexpected exception when a role has an empty argument_specs.yml (#75604)
* Fix role with empty argument_specs.yml

* Use try/except and add changelog fragment

* Always return a dict

* Add test for empty argument_specs key
2021-09-10 14:35:41 -04:00
Matt MartzandGitHub 55d448baa7 Run apache via async (#75682) 2021-09-10 12:02:58 -05:00
649a5bbda2 Fix cleaning up user for unarchive tests (#75681)
Become root to clean up user

Clean up users with force and remove enabled

Co-authored-by: Matt Martz <matt@sivel.net>
2021-09-10 12:44:42 -04:00
Matt MartzandGitHub 05464a0ff7 Ensure we set perms on htpasswd file to avoid permissions errors (#75679) 2021-09-10 11:06:43 -05:00
7cbb53fe9a Fix test interactions by cleaning up users with the same uid by using 'force: yes' and 'remove: yes' (#75670)
Co-authored-by: Matt Martz <matt@sivel.net>
2021-09-09 18:32:21 -04:00
Martin KrizekandGitHub 63413dd483 Remove incidental_win_security_policy (#75654)
* Add an intentional test for diff.prepared

ci_complete
ci_coverage

* Remove incidental_win_security_policy

* Forgot to remove this
2021-09-09 12:17:48 -07:00
Erik ZettelandGitHub c2fa71c4e8 Fix various typos in documentation (#75662)
* docs/docsite/rst/dev_guide/developing_modules_general_aci.rst: fix typos

* docs/docsite/rst/dev_guide/testing/sanity/no-get-exception.rst: fix typos

* docs/docsite/rst/dev_guide/testing_units_modules.rst: fix typos

* docs/docsite/rst/network/dev_guide/developing_resource_modules_network.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_2.0.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_2.10.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_2.4.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_3.rst: fix typos

* docs/docsite/rst/porting_guides/porting_guide_4.rst: fix typos

* docs/docsite/rst/reference_appendices/glossary.rst: fix typos

* docs/docsite/rst/reference_appendices/release_and_maintenance.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_rest_scenarios/collect_information.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_rest_scenarios/vm_tool_information.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_inventory_vm_attributes.rst: fix typos

* docs/docsite/rst/user_guide/playbooks_debugger.rst: fix typos

* docs/docsite/rst/user_guide/playbooks_filters.rst: fix typos

* docs/docsite/rst/user_guide/windows_performance.rst: fix typos

* docs/docsite/rst/scenario_guides/vmware_scenarios/vmware_inventory_vm_attributes.rst: fix typos
2021-09-09 08:34:46 -07:00
Matt ClayandGitHub 8d84f3c593 Fix fetch integration test. (#75661) 2021-09-08 22:11:40 -07:00
Abhijeet KasurdeandGitHub 12734fa21c yaml dumper: Add YAML respresenter for AnsibleUndefined (#75078)
Fixes: #75072

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-09-07 10:21:47 +05:30
Matt ClayandGitHub de01db08d0 pip - Use pip from the current Python interpreter. (#75634)
* pip - Use pip from the current Python interpreter.

If `executable` and `virtualenv` were not specified, and
the `pip` Python module is available for the current interpreter,
use that `pip` module instead of searching for a `pip` command.

* Add comment about needing `__main__` to run `pip`.

* Fix unit test.

* Add porting guide entry.

* Update changelog to match porting guide description.

ci_complete
2021-09-03 15:17:43 -07:00
Matt ClayandGitHub fc8197e326 AnsiballZ - Make sure cwd is accessible. (#75636) 2021-09-03 08:31:20 -07:00
Martin KrizekandGitHub e60ee82343 docs: clarify that known_hosts path must exist (#75615)
* docs: clarify that known_hosts path must exist

Fixes #75606

* Clarify clarification.
2021-09-02 12:43:19 -07:00
MaxBradyandGitHub ccf8a7da82 Modify getent example; closes #75624. (#75633)
* Adds "ansible_facts." in front of each getent example.
2021-09-02 15:27:17 -04:00
Ikko AshimineandGitHub 7ff2a55f3f psrp - fix typo (#75617)
psuedo -> pseudo
2021-09-02 15:17:26 -04:00
Brian CocaandGitHub 90518d8bb5 added vault/unvault docs (#75140) 2021-09-01 16:49:21 -04:00
Brian CocaandGitHub 5ecbc199f8 ssh connection added option priority note (#75219) 2021-09-01 16:48:06 -04:00
Brian CocaandGitHub 8af54a0355 Added info about playbooks for collection (#75535)
*
2021-09-01 16:40:03 -04:00
Alicia CozineandGitHub 2c67954f9b Docs: adds warning about utf-8 in templates (#75504) 2021-09-01 16:21:18 -04:00
Toshio KuratomiandGitHub 0ef9b9ee49 Update the porting guide for a new ansible version (#75610) 2021-09-01 15:44:07 -04:00
dcd31da01a clarify cacheable (#75085)
* clarify cacheable

* Update lib/ansible/modules/set_fact.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-09-01 15:42:24 -04:00
Sloane HertelandGitHub f38a97cece Fix build_ignore when installing a collection from source (#75547)
* Make individual dirs that should exist instead of using shutil.copytree

* Test build_ignore when installing collections in git repos

* changelog

* Fix assertion
Fix git directory

* Fix nested content while building the collection dir

Test installing a collection from a git repo and artifact have the same result

Refactor to use variables
2021-09-01 18:36:09 +02:00
Mads JensenandGitHub d6dededab8 Use context manager for file handling in some system modules. (#65227) 2021-09-01 11:29:35 -04:00
Martin KrizekandGitHub 9c2f44b884 Fix templating task action with host-specific vars (#75600)
Fixes #75568
2021-08-31 17:33:57 +02:00
Matt Clay bee5e02232 Rename integration test targets.
Improve consistency with naming of tests for Ansible CLI commands.
Fix naming of module_utils tests to match the files under test.
2021-08-30 17:11:07 -07:00
388760eef6 Docs: Add more Matrix documentation (#75588)
* Refs #75478 - On the communicating page, add Matrix links to first 4 chat spaces, improve introduction, update working groups with Matrix and IRC locations, add a link to the community FAQ, add localised community translations, and remove Lightbulb room, the GitHub project has been archived

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2021-08-30 18:44:27 -05:00