Commit Graph

31652 Commits (43d09710c81f36113fec8d68e650a6b6d82dca05)

Author SHA1 Message Date
Sebastian Gumprich 6e6f846db1
Add space to error message output (#76063) 3 years ago
jbpratt 3add434269
add missing space to `--playbook-dir` help string (#76062) 3 years ago
jaydesl 4cf290918f
docs: clarify skip_broken option in dnf/yum (#76038) 3 years ago
Yedidyah Bar David aff5e5dfc6
_run_loop: Add the task name to the warning (#76012)
Prepend the task name to the warning "The loop variable 'item' is
already in use", so that you can get some context even if stdout and
stderr go to separate places.
3 years ago
Martin Krizek b1211429d5
Fix executing includes in the free strategy (#75649)
Fixes #75642
3 years ago
Víctor A. Rodríguez e53982cd09
The apt module won't work with python-apt < 0.8.9 (such as on Ubuntu 10.04) (#75993)
* Check if deb file to deploy has architectures attribute, fixes ansible#47277
3 years ago
Vladimir Botka 8c3e576cd5
Fix docs get_url dest comment. Checksum does not prevent download if dest is dir. (#73185) 3 years ago
Matt Martz 8510db4935
Allow ca_path to point to a bundle (#75894)
* Allow ca_path to point to a bundle. Fixes #75015
3 years ago
Martin Krizek 23b9d197eb
ansible-doc: ignore plugin deprecation warnings (#75674)
Fixes #75671
3 years ago
Miroslav Brabenec bc0caad2ad
Fix parsing of device serial number for RHEL8 (#75876)
* Fix parsing of device serial number for RHEL8

* Add tests and changelog

Co-authored-by: Miroslav Brabenec <miroslav.brabenec@memsource.com>
3 years ago
Matt Clay 1932f0008b
ansible-core - Remove support for Python 2.6. (#75853) 3 years ago
Jeremy Kimber 827981c7dd
Add support for distinct collection skeleton configuration (#75845)
Signed-off-by: Jeremy Kimber <jeremy.kimber@garmin.com>

Co-authored-by: Jeremy Kimber <jeremy.kimber@garmin.com>
3 years ago
Martin Krizek f774292439
cli - remove deprecated setting verbosity before sub command (#75840)
* cli - remove deprecated setting verbosity before sub command

Fixes #75823

* Fix tests
3 years ago
Martin Krizek 239dbcb24f
copy: remove deprecated thirsty alias (#75839)
Fixes #75824
3 years ago
Martin Krizek 44095caca9
url_argument_spec: remove deprecated thirsty alias (#75838)
Fixes #75825
Fixes #75826
3 years ago
Martin Krizek 13e535c3bc
Remove deprecated Templar.set_available_variables() (#75836)
Fixes #75828
3 years ago
Daniel Ziegenberg 963a272b28
uri: add documentation for return value path (#75795) 3 years ago
Matt Davis bb59d9afe9
bump devel to 2.13 (#75833) 3 years ago
Brian Coca 5d1abdbf6b
correct runas comment (#75806) 3 years ago
Matt Martz 79e9dae292
Don't show params when there is an issue with `set_option(s)` (#75805) 3 years ago
Brian Coca 872fda8815
attribs last PR for now ... i hope (#75778)
* attribs last PR for now ... i hope

* thatsallfolks!

* fixes

* Update lib/ansible/modules/template.py

Co-authored-by: Matt Martz <matt@sivel.net>

* Update lib/ansible/modules/validate_argument_spec.py

Co-authored-by: Matt Martz <matt@sivel.net>

* moar fixes

* asldf

* missing import

* iswearihadaddedthese

Co-authored-by: Matt Martz <matt@sivel.net>
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
Rafael Minguillón Sánchez e2ad9f1c85
Changed to file instead path for touch choice in state parameter docs (#75282) 3 years ago
Jordan Borean a2d4a8a9f3
PowerShell - Support optional module util imports (#75187) 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
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 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
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
zorun 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>
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
Sloane Hertel 45459346ed
Document diff mode support for apt_repository and cron (#75709) 3 years ago
Brian Coca 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>
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
Abhijeet Kasurde 12734fa21c
yaml dumper: Add YAML respresenter for AnsibleUndefined (#75078)
Fixes: #75072

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
3 years ago
Matt Clay 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
3 years ago
Matt Clay fc8197e326
AnsiballZ - Make sure cwd is accessible. (#75636) 3 years ago
Martin Krizek e60ee82343
docs: clarify that known_hosts path must exist (#75615)
* docs: clarify that known_hosts path must exist

Fixes #75606

* Clarify clarification.
3 years ago