Commit Graph

11237 Commits (a9bd8b6cff7504df0b3d270d04cbd0009e3ae4b1)

Author SHA1 Message Date
Matt Martz 79e9dae292
Don't show params when there is an issue with `set_option(s)` (#75805) 3 years ago
Brian Coca a22964609e
Fix lineinfile test (#75785)
* fix remote test after controller split

* other files had it too!
3 years ago
Matt Clay 0d5a9f2138 ansible-test - More PEP 484 type hints. 3 years ago
Matt Clay e66e2e25c8 ansible-test - Update default containers. 3 years ago
Sloane Hertel 845935f74f
Revert "Compile role with parents in the task's dependency chain (#75165)" (#75779)
This reverts commit 440cf15aeb.
3 years ago
Matt Clay 6a5d6896fd ansible-test - Warn about stale sanity venvs. 3 years ago
Matt Clay b70077364a ansible-test - More PEP 484 type hints. 3 years ago
Matt Clay 58b03be417
ansible-test - Code cleanup. (#75774)
* ansible-test - Remove unused code.
* ansible-test - More PEP 484 type hints.
3 years ago
Matt Clay 6c133da45e
ansible-test - Fix code coverage reporting. (#75771) 3 years ago
Jordan Borean 43e1cba8c1 Fix up validate-modules sanity check for PowerShell - ci_complete 3 years ago
Matt Clay b51e62f6e5 ansible-test - Add minimum constraints for pytest.
Use `--strict` for `pytest` on Python 2.6 since `--strict-markers` is not available.
3 years ago
Jordan Borean a2d4a8a9f3
PowerShell - Support optional module util imports (#75187) 3 years ago
Matt Clay e3fd9b0769 ansible-test - Add `--prime-containers` option.
Resolves https://github.com/ansible/ansible/issues/75320

The option `--prime-containers` was chosen over `--docker-pull-only` to match the recently added `--prime-venvs` option for sanity tests.
It would also fit well with a future `--prime-requirements` option for pre-installing requirements for unit and integration tests.
3 years ago
Matt Clay 28a094c5de ansible-test - Remove unused constraints.
ci_complete
3 years ago
Felix Fontein 67ca455829
attributes: support extra value 'not applicable' for support (#75751)
* Support two extra values 'unknown' and 'not applicable' for support.

* Simplify to only one new state: 'n/a'

* Adhere to the IBM style guide.
3 years ago
Brian Coca c5d8dc0e11
Add attributes 2/x (#75619)
* Added attribute information to more modules

 rearranged the shared data
 platform revamped
 use 'details' and avoid overriding description

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/fail.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/debug.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/command.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/assert.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_core.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/gather_facts.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/include_vars.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/meta.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/meta.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_common_attributes.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_common_attributes.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update lib/ansible/plugins/doc_fragments/action_common_attributes.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago
Matt Clay 78ff1ab546 Add constraints to prepare_http_tests target. 3 years ago
Matt Clay 46c7b24188
ansible-test - Update distro test containers. (#75762) 3 years ago
Matt Clay 5cb54e8c58
ansible-test - Create injector scripts at runtime. (#75761)
* ansible-test - Create injector scripts at runtime.
* Set bootstrap.sh shebang at runtime.
* Remove shebang and execute bit from importer.
* Update shebang sanity test.
* Preserve line numbers.
3 years ago
Sloane Hertel 440cf15aeb
Compile role with parents in the task's dependency chain (#75165)
* Use the task dependency chain to compile the role instead of the parent role's _parents list

* keep existing role inheritance, but limit it to roles in the current task dependency chain

* Test getting role parents recursively by using the current task dependency chain

* changelog
3 years ago
Matt Clay 7a76130502 ansible-test - Update default containers.
ci_complete
3 years ago
Matt Martz 96b221b344
Update vendored copy of distro to 1.6.0 (#75732)
* Update vendored copy of distro to 1.6.0

* copy pasta mistake

* ci_complete
3 years ago
Ross Bender 7a4b5d14fc
ansible-galaxy role install: download from API response location (#73114)
* download role from api response location

* include changelog fragment

* add unit test for role download url

Co-authored-by: Sam Doran <sdoran@redhat.com>
3 years ago
Thomas Sjögren 57359d0174
use passlib default if `password_hash` option isn't set (#75043)
* add changelog fragment
* password_hash|length == 120
* mention the new default bcrypt format in the porting guide
3 years ago
Sloane Hertel 7ecc227488
ansible-galaxy: Clone git collections using shallow clones (#75722)
* ansible-galaxy: Clone git collections using shallow clones

This ensures the collection obtained via git url is a result of a
shallow git clone (git clone --depth=1). The git history of the
collection is not used by ansible, and as such, cloning the entire
history of the repo is unnecessary.

Signed-off-by: Tomas Babej <tomas@tbabej.com>

* ansible-galaxy: Only perform shallow clones on non-versioned git urls

In general, the version can be anything we can checkout (branch, tag,
but also a commit hash). In particular for commit hashes we cannot
perform a shallow clone.

Err on the safe side and only perform shallow clones for non-versioned
git urls (cloning HEAD).

* galaxy-install: Make shallow cloning compatible with older Python versions

Signed-off-by: Tomas Babej <tomas@tbabej.com>

* Pass args as a tuple

Add tests for the git command created from different repo and version combinations

* changelog

Co-authored-by: Tomas Babej <tomas@tbabej.com>
3 years ago
Matt Martz 724800cd3f
Python 3.8 Controller Minimum (#74013) 3 years ago
Sloane Hertel 4ab90f3afc
Re-enable old_style_cache_plugin test target (#75748)
Fix tests for cache plugins written before ConfigManager
3 years ago
Matt Clay 4652d6ee43 ansible-test - Remove deprecated environments. 3 years ago
Matt Clay 94410789d1 ansible-test - Add `--prime-venvs` option. 3 years ago
Matt Clay 178a67fd40
ansible-test - Add support for windows/2022 (#75743)
ci_complete
3 years ago
Matt Clay 4ea8d9a782
ansible-test - split controller/target testing (#75605) 3 years ago
Daniel Goldman 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>
3 years ago
Rick Elrod 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>
3 years ago
Chris Hambridge 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>
3 years ago
Matt Clay 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`.
3 years ago
Matt Clay b281f84bc4 Ignore support code in update-bundled test. 3 years ago
Jordan Borean 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
3 years ago
Sam Doran a11bb8b4d3
Revert "user - consistently create user home directory on Linux (#71952)" (#75704)
This reverts commit 2f7e0b8489.
3 years ago
Sloane Hertel 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
3 years ago
maulikd 9558f53a58
Fix git submodules path issue (#75655)
* Fix git path used for submodules

* Fix git submodules integration test
3 years ago
hyperreality 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>
3 years ago
Brian Coca 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
3 years ago
Sloane Hertel 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>
3 years ago
devon-mar 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
3 years ago
Matt Martz 55d448baa7
Run apache via async (#75682) 3 years ago
Sloane Hertel 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>
3 years ago
Matt Martz 05464a0ff7
Ensure we set perms on htpasswd file to avoid permissions errors (#75679) 3 years ago
Sloane Hertel 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>
3 years ago
Martin Krizek 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
3 years ago
Matt Clay 8d84f3c593
Fix fetch integration test. (#75661) 3 years ago