Commit Graph

32187 Commits (45df14a2e05573e6213ce789aa3278f4f30fa54f)

Author SHA1 Message Date
Martin Krizek 9950a86f73
Remove unnecessary special case in Role.load_data (#78181)
ci_complete
2 years ago
Brian Coca d26801e994
Fix wording for :ref|term: substitution (#78216)
* Fix workding for :ref|term: subsitution

 now matches 'seealso' and makes more sense:

  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with `until`.
  ```
 vs
  ```
  delay:
  applies_to:
  - Task
  description: Number of seconds to delay between retries. This setting is only used
    in combination with website for `until`.
  ```

* updated unit tests

* match see also

* more sanity
2 years ago
Brian Coca f6419a53f6
Ensure atomic writes for cache file (#78208)
* Ensure atomic writes for cache file

 helps avoid errors in highly concurrent environments
2 years ago
Alex Willmer e10851d495
documentation: become plugins: correct pluralization in description (#78196)
fixes #78195
2 years ago
Micah Beasley 489b7f1859
Update dpkg_selections.py (#78177)
* Update dpkg_selections.py to include an syntax example showing how to remove package holds

* Fix pep8 issue: dpkg_selections.py

Missed some trailing spaces when adding example text.
2 years ago
Jan Christian Grünhage b56d73796e
Clarify that sbin directories are always looked at in get_bin_path (#78171) 2 years ago
Martin Krizek 17d52c8d64
Move undefined check from concat to finalize (#78165)
* Move undefined check from concat to finalize

In the classic Jinja2's Environment str() is called on the return value of the
finalize method to potentially trigger the undefined error. That is not
the case in NativeEnvironment where string conversion of the return value is
not desired. We workaround that by checking for Undefined in all of our concat
functions. It seems simpler to do it earlier in the finalize method(s) instead.
As a side-effect it fixes an undefined variable detection in imported templates.

Fixes #78156

ci_complete

* Fix sanity

* ...

* sigh
2 years ago
René Moser 953a86f5a6
doc: filter: unvault: fix example (#78161)
no filter named to_string
2 years ago
LRitzdorf 6bcb494f83
[dnf] Fix skip_broken, add test coverage (v2) (#78158)
* [dnf] Fix skip_broken, add test coverage

Change:
- skip_broken was set in config but not actually used in calls to
  base.install()
- added a lot of test cases with specialized repo
- got rid of external (docker repo) nobest test cases since the
  specialized repo works well for those too
- Slight cleanup and adding comments in dnf module

Test Plan:
- ci_complete

Tickets:
- Fixes #73072

Original-author: Rick Elrod <rick@elrod.me>

* Use a better test for checking results list

ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>

Co-authored-by: Rick Elrod <rick@elrod.me>
2 years ago
Matt Martz bcdc2e167a
Support for Python 3.11+ tomllib for inventory (#77435) 2 years ago
Matt Martz 5797d06aec
Use customized setraw to prevent output issues (#78060) 2 years ago
Martin Krizek 43153c5831
`FieldAttribute`s as descriptors (#73908) 2 years ago
mlevens-hw 4c9385dab7
Fix documentation with misleading data type (#78157)
##### SUMMARY
The sample value given for the 'mode' parameter is shown without quotes, but the data type is string. If you actually try to use an unquoted numeric string for this value you're in for a nasty surprise! I added quotation marks to the sample value.
##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2 years ago
Brian Coca fa35aa4865
Galaxy server config updates (#77106)
* ansible-galaxy configurable timeouts

  - also fixed issues with precedence,
    so --ignore-certs now overrides config
  - made galaxy_timeout generic setting,
    if set, it becomes default for server configs,
    but now specific servers can override
  - updated tests or added notes (some tests ignore/override precedence)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Sandra McCann 3e3f8cb004
Update list for gather_subset (#78133) 2 years ago
Tabah Baridule 08b438c4ba
Updated the document 'src' in URI (#78105) 2 years ago
Brian Coca 34f8168afc
ansible-console fixes (#78064)
* list collection task actions too
* dynamically add execute/help functions when module is found
* handle redirection and short names
2 years ago
Brian Coca cea18bf60a
password lookup argument parsing fix (#78080)
fixes #78079
2 years ago
Chris James ea351f0ae2
user - Use -n instead of -N for luseradd on all distros (#75042)
* Use -n instead of -N for luseradd on all distros

Co-authored-by: Chris James <git@etcet.net>
2 years ago
Jef Vantongerloo 44b5314174
fix missing single quotes in sample code (#78056) 2 years ago
optica-phoffmann c321e3baad
update documentation of 'unarchive' (#77643) 2 years ago
David Greaves 5b90601ca4
Document debconf interaction with dpkg-reconfigure (#74196)
Signed-off-by: David Greaves <david@dgreaves.com>
2 years ago
Brian Coca 3a5a61b783
hide distro map since it is not configurable (#78068)
make it a private setting for internal use and avoid
 user confusion by not displaying it with normal configuration options
2 years ago
Matt Martz 18992b7947
Add new `loop_control.extended_allitems` option (#75760)
* Add new `loop_control.extended_allitems` option. Fixes #75216

* Add test for extended_allitems

* docs code block fix
2 years ago
Matt Martz a90f666ab3
Use ctypes to access shadow, instead of spwd which is deprecated (#78050)
* Use ctypes to access shadow, instead of spwd which is deprecated

* Remove sanity ignore

* cast to str to satisfy mypy

* Add typing.cast polyfill

* Appease mypy redefine

* Add clog frag
2 years ago
David Moreau Simard d81a519f25
Remove .travis.yml files from galaxy init skeletons (#75740)
* Remove .travis.yml files from galaxy init skeletons

These files have existed for many years but in light of the recent
circumstances around Travis, we should not include them by default in
the galaxy init skeletons.

* Add breaking_changes changelog fragment with recommendation to use a custom skeleton if the .travis.yml file is still needed.

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Sergey 30a923fb5c
Fix 'Permission denied' in user module while generating SSH keys (#78040)
* Fix 'Permission denied' in user module while generating SSH keys

Fix #78017
Use try/except for spwd usage to prevent "Permission denied".

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Clay 95df5cb740 Fix invalid-ansiblemodule-schema sanity errors.
The validate-modules sanity test expects a list not a dict_keys iterable.
2 years ago
Brian Coca 3fa377387e
shell plugins give out user friendly type error (#77983)
shell plugins give out user friendly type error
# TODO: this should really have been taken care of via config or fieldattribute validation
2 years ago
Brian Coca 04c7abcbfe
corrected version_added for new config option (#78013)
new option, not subs should have version, also it's 2.14
2 years ago
zorun 05fc96c927
facts: Add uptime fact for NetBSD (#75431)
* facts: Add uptime fact for NetBSD

This is copied from the current OpenBSD facts code.

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

* Added changelog fragment

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2 years ago
Ganesh Nalawade 1b1c2c79cf
Add configurable option for paramiko banner_ssh timeout (#68184)
* Add configurable option for paramiko banner_ssh timeout

This PR adds a configurable option for paramiko connection
to control the value of banner timeout in paramiko library.
The banner timeout value can be set in ansible.cfg file as
The default value of banner timeout is set to 30 seconds in
paramiko connection plugin.
```
[paramiko_connection]
banner_timeout = 30
```
or using enviornment variable
```
export ANSIBLE_PARAMIKO_BANNER_TIMEOUT=30
```

* Fix CI failure

* Fix review comments

* Fix review comment
2 years ago
Felix Fontein 570379ef98
Do not crash callbacks if exception is not a string. (#77781) 2 years ago
Matt Davis 6e78425f8d
fix pip module resolution (#78000)
* `importlib.util` appears to be lazily imported and is sometimes unavailable as an attribute of `importlib` without an explicit import
2 years ago
Sloane Hertel db335498d0
ansible-galaxy - ensure variable is defined for any error when getting the ansible-core distribution (#77993) 2 years ago
Matt Clay 5a0b230e24 Make fuzzy plugin matching deterministic. 2 years ago
Sloane Hertel 9d6cc7b576
unarchive - fall back to unzip -Z if zipinfo is not available (#76971)
Add a new handler class ZipZArchive to use unzip -Z as an alternative to zipinfo

Run 'unzip -Z' in can_handle_archive so we fall back to the next handler if it's not available (failing in is_unarchived is too late)

* Add a test for unzip -Z when zipinfo is not available

* Update test for missing binary altogether by removing /usr/bin from the PATH
2 years ago
Matt Martz 5e369604e1
Forked display via queue (#77056)
* Forked Display via queue

* Docs and simple code cleanup

* Only proxy Display.display

* Remove unused import

* comment

* Update deadlock comment, remove py3 check

* Don't flush display, and don't lock from forks

* clog frag

* ci_complete ci_coverage

* Add units for queue proxying

* Cleanup flush

* ci_complete

* Only lock the write, switch to RLock

* Remove unused import
2 years ago
Sloane Hertel 143e7fb45e
ansible-galaxy - support resolvelib versions >= 0.5.3, < 0.9.0 (#77649)
* ansible-galaxy - support resolvelib versions >= 0.5.3, <= 0.8.1

Test incompatibilities are removed for resolvelib >= 0.6.0

Test against the latest 0.8.x version and fix requirements

* Fix tests - use a venv for testing the range of resolvelib versions

* Update temporary hardcoded fallback for ansible-test

* Update hardcoded upperbound for sanity tests

* Make error check more flexible
2 years ago
Brian Coca 89c6547892
preserve add_host/group_by on refresh (#77944)
* preserve add_host/group_by on meta: refresh_inventory

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2 years ago
Martin Krizek 39b3581316
Deprecate non lists lookups (#77875) 2 years ago
Sloane Hertel c908d782fb
get_url - permit to have a checksum only file (#77948)
checksum can also accept a checksum only file (no filename beside the checksum).
fixes #54390

Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
2 years ago
Don Naro 15750aec52
ssh retry docs addition (#77930) 2 years ago
Sloane Hertel f270b4e224
Fix items2dict errors for incorrect list item type and missing keys (#77946)
* Fix items2dict errors for incorrect list item type and missing keys

* keep dict comprehension
2 years ago
Martin Krizek 058a69e6b0
Properly send a skipped message for empty templated loop (#77945)
Fixes #77934
2 years ago
Kristian Heljas 9767cda507
Make `ignore_unreachable` to count `ignored` counter
Fixes #77690
2 years ago
Julien Lecomte 33beeace10
Fix lusermod using a group name and not id (#61965) (#77914)
* Fix lusermod using a group name and not id (#61965)
2 years ago
Sloane Hertel 1214b63f4f
Fix 'ansible-config dump --only-changed -t all' verbosity (#77898)
* Fix 'ansible-config dump --only-changed -t all' to only display headers if plugin options are changed

* changelog

* add a test
2 years ago
Brian Coca dbbeea0686
more context on multiple facts modules (#77896) 2 years ago
Wouter Schoot 711b51fad6
Remove double spaces in errormessage (#77839) 2 years ago
OscarBell 74eb8b779d
Blockinfile multiline search (#75090) 2 years ago
Matt Davis 813afcbbb4
swallow all exceptions in type annotation support shim imports (#77860)
* swallow all exceptions in type annotation support shim imports

* add changelog
2 years ago
Brian Coca f7d7604454
Add uri, urn and url test plugins (#77423)
and docs!

Co-authored-by: Tabah Baridule <dulemartins07@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Ian Wienand e4c0bbf885
apt: fix virtual package install version detection (#76781)
* apt: fix virtual package install version detection

Change 4a62c4e3e4 introduced version
matching in installation.

The problem stems from

 if version_installable or version:
     pkg_list.append("'%s=%s'" % (name, version_installable or version))

When the package is a virtual-package, package_status() is returning
the "version_installable" of the package *satisfying* the
virtual-package; but then this is trying to install the
virtual-package with this version pin.

For example, "yaml-mode" is a virtual package satisifed by
"elpa-yaml-mode" (currently 0.0.14-1) and trying to install it fails
with

 $ usr/bin/apt-get -y ... install 'yaml-mode=0.0.14-1'
 ... failed: E: Version '0.0.14-1' for 'yaml-mode' was not found ...

In the case of a virtual-package with nothing installed to satisfy it,
we should just return blank values to allow apt-get to do it's thing.

The tests are updated to install and remove this package.

Fixes: #76779
2 years ago
Felix Fontein 6fbc8bd2bc
Fix boolean condition so that ansible-galaxy collection install works when a valid resolvelib is installed. (#77906) 2 years ago
Sloane Hertel 82f3a57bee
Fix ansible-galaxy traceback when unexpected version of resolvelib is installed (#77630)
* Fix traceback when a supported version of resolvelib is not installed

Try to read the supported version range from the package distribution info and fall back to a hardcoded lowerbound/upperbound (>=0.5.3,<0.6.0).

* Add tests for unsupported resolvelib versions

* Resolve remaining import sanity test issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Sloane Hertel 621e782ed0
Add toggle to fix module_defaults with module-as-redirected-action on a per-module basis (#77265)
* If there is a platform specific handler, prefer the resolved module over the resolved action when loading module_defaults

Add a toggle for action plugins to prefer the resolved module when loading module_defaults

Allow moving away from modules intercepted as actions pattern

Fixes #77059
2 years ago
Brian Coca eecbaee7f4
Fix windows connection options (#77844)
* winrm, psrps added missing var entry

 this handles issue with the default being set to inventory_hostname
 but defaults not being templated implicitly

 fixes #77841
2 years ago
Robert Muir 0f882d010f
Supply 'dev' keyword for linux network facts discovery (#77793)
This avoids incorrect results when the device name conflicts with
another 'ip' keyword. For example, if the device name is 'primary'.

Closes #77792
2 years ago
Sloane Hertel 400475acc0
validate meta/main.yml dependencies and meta/requirements.yml are both lists before concatenating them together (#77821) 2 years ago
Brian Coca e85e8ee00a
set theory filter docs (#77801)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2 years ago
Brian Coca c83419627a
apt_repository add falalback to deprecated apt-key usage (#77340)
New path uses gpg directly and the stated directories and keystores to use by debian docs

Co-authored-by: Matt Clay <matt@mystile.com>
2 years ago
Matt Clay dfde4be444 Add Python 3.11 support.
ci_complete
ci_coverage
2 years ago
Brian Coca 4706091a38
rename systemd module to services only (#77644)
* rename systemd module to services only

 disambiguates what it handles since systemd is now much more
 that a service manager, but the module is specific to services
2 years ago
Joseph Torcasso c9ce7d08a2
template/__init__.py - fix KeyError when wantlist=False with non-list 2 years ago
Brian Coca 5e50284693
Restrict role loading .. to role ... (#77683)
* Ansible will now error out if you try to use the `*_from` to load files from outside the role being loaded by `{import,include}_role`
2 years ago
Martin Krizek e9af6efee6
Raise a proper error when include/import_role is used as a handler (#77807) 2 years ago
Mark Chappell cb448097e4
Minor typo fix (#77804) 2 years ago
Brian Coca 0d6aa2e87e
More information on doc parsing errors (#77685)
* More information on doc parsing errors

  fixes #77675
2 years ago
Abhijeet Kasurde 524d30b8b0
distribution: add distribution_minor_version for Debian Distro (#74721)
* Added a fact about minor version details for Debian Distro

Fixes: #74481

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Brian Coca 46d2c9a988
document some 'dir' based filters (#77687)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
2 years ago
Tabah Baridule 18fe5a8835
Updated text in ini.py (#77746) 2 years ago
Matt Clay cc5ac88c4c Update mypy test. Fix type hints for Python 3.9.
This also bumps the minimum controller version (for mypy only) to Python 3.9.
2 years ago
Martin Krizek dbdbfe845a
Remove deprecated subclassing DefaultCallback without doc_fragment (#77677) 2 years ago
Brian Coca a12e0a0e87
ansible-config added json/yaml output to list/dump (#77447)
fixes #733644
2 years ago
Brian Coca a3cc6a581e
dont rely on path to set config defs for plugins (#77659) 2 years ago
Brian Coca fb2f080b42
document base64 filters (#77657)
* document base64 filters

* Update lib/ansible/plugins/filter/b64decode.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>

* Update lib/ansible/plugins/filter/b64encode.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
2 years ago
Martin Krizek ec00c9c64e
Deprecate FACT_PATH/GATHER_SUBSET/GATHER_TIMEOUT defaults (#77656) 2 years ago
Martin Krizek ed30fc9a06
Remove deprecated loading cache plugins directly without cache_loader (#77655) 2 years ago
Brian Coca 749a105956
ansible-doc stay 3.8 python compatible (#77682)
pathlib with_stem will wait till 3.9
  also add tests by listing filters
2 years ago
Matt Clay f7c2b1986c Require blocking IO for ansible CLI. 2 years ago
Brian Coca b439e41a91
expand ansible-doc coverage (#74963)
* Expand ansible-doc to tests/filters and fix existing issues

  enable filter/test docs if in single file or companion yaml
  add docs for several filters/tests plugins
  allow .yml companion for docs for other plugins, must be colocated
  verify plugins are valid (not modules, cannot)
  fix 'per collection' filtering
  limit old style deprecation (_ prefix) to builtin/legacy
  start move to pathlib for saner path handling
  moved some funcitons, kept backwards compat shims with deprecation notice

  Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
  Co-authored-by: Felix Fontein <felix@fontein.de>
  Co-authored-by: Sandra McCann <samccann@redhat.com>
2 years ago
Sandra McCann d321fa3f15
remove import_play examples from include module (#77597) 2 years ago
Brian Coca af9f628ab5
Add python path to version output (#77631)
To further disambiguate 'which' python is the correct python
2 years ago
Martin Krizek 3980eb8c09
Prevent losing unsafe from lookups (#77609)
* Prevent losing unsafe from lookups

This patch fixes a bug which under certain conditions results in data
returned from lookups not being marked as unsafe.

Each time Templar.do_template is invoked a new AnsibleContext is
created and stored effectively at two places:
1) as an instance variable in templar_obj.cur_context
2) as a local variable called new_context in do_template method of Templar

Due to custom functionality in Ansible's Context that allows for nested
templating it is possible that during resolving variable's value
template/do_template method is called recursively again, again creating
a new context. At that point the problem manifests itself because as
mentioned in 1) above the context is overwriten on the templar object
which means that any subsequent calls to _lookup will use the new
context to mark it as unsafe which is now different to the local
new_context which is used for testing for unsafe property.

The solution to the problem appears to be to restore the original
context inside do_template and also to eliminate the local variable
new_context to prevent problems in the future.

It appears that we don't have a better way of storing the context other
than as some form of global variable and so this appears to be the
"best" solution possible at this point. Hopefully data tagging will be
the solution here.

For more examples see unit and integration tests included in this patch.

Fixes #77535
2 years ago
Matt Clay 6fdec4a6ab Revert "Require blocking IO for ansible CLI. (#77639)"
This reverts commit e2d54d3594.
2 years ago
Matt Clay e2d54d3594
Require blocking IO for ansible CLI. (#77639) 2 years ago
Sandra McCann 1802684c7b
add link to deprecation warning (#77599)
* add link to deprecation warning

(cherry picked from commit f991470dd0)
2 years ago
code-review-doctor 578a815271
Fix issue probably-meant-fstring found at https://codereview.doctor (#77619) 2 years ago
Brian Coca d06d99cbb6
git fix docs and wrapper script (#77588)
* git fix docs and wrapper script

 fixes #77582

 now env var is set to wrapper or full command depending on version
 as was the intent of previous PR
 added ref to git commit from git for why/how we used the env vars

* handle key_file
2 years ago
Sam Doran 1b947eaf92
arg_spec - Return aliases in validation result and update aliases (#77576)
When looking up the `no_log` setting for a parameter that is an alias in
`AnsibleModule._log_invocation()`, the alias value will always be an
empty dictionary since `self.aliases` on the `AnsibleModule` instance is
never updated after initialization. Since the `no_log` setting is on the
canonical parameter not the alias, an incorrect warning is issued if the
parameter matches `PASSWORD_MATCH`.

This PR returns the aliases dictionary as an attribute of the
`ValidationResult` and updates the `aliases` attribute on the
`AnsibleModule` instance.
2 years ago
Sloane Hertel 494f932773
Deprecate PlayContext.verbosity (#77507)
display.verbosity should be used instead
2 years ago
Brian Coca 2c2a204dc6
varaiblemanager, more efficienet vars file reads (#77570) 2 years ago
Jack 4d69c09695
ansible-galaxy collection - ensure dependencies are a dict (#77561)
* fix traceback when installing collection with dependencies set to None
2 years ago
Sloane Hertel 9280396e19
Fix error message for non-str hosts in yaml inventory (#77544) 2 years ago
Brian Coca abdd237de7
Yolo (#77554)
* Revert "Revert "Config, ensure templating happens at functions (#77483)""

This reverts commit 94c9106153.

* removed update configdata, which is unused
* removed test for action we don't perform anymore
* removed unused configdata
2 years ago
Matt Clay 94c9106153 Revert "Config, ensure templating happens at functions (#77483)"
This reverts commit 6e5f1d781d.
2 years ago
Brian Coca 762d97f1b8
setup: remove 'any' as seemingly valid option (#77532)
fixes #59783
2 years ago
Junegunn Choi 2ba39fcf8c
Update pip example with standard lowercase http[s]_proxy env vars (#77515) 2 years ago
Martin Krizek cbe42bff7f
Allow for lazy evaluation of Jinja2 expressions (#56116) 2 years ago
Brian Coca f2ab920822
Better info sourcing (#77511)
Task is  authoritative
   also includes latest per loop info
   and fix tests
2 years ago
Brian Coca 793bb200ec
CLI now issues clearer error when 0 hosts selected (#77517)
fixes #77512
2 years ago
Brian Coca 6e5f1d781d
Config, ensure templating happens at functions (#77483)
move away from special templating in constants.py
 simplified main get, unified paths to get info

* Let native jinja deal with eval for type
* make constants available for templating defaults
* ensure we use config file
2 years ago
Will Thames c3a3bc1d0d
Allow strftime to display time in UTC (#70351) 2 years ago
Brian Coca a0dede5458
ansible-connection verboistery (#77509)
* ansible-connection verboistery

  for cli, just use normal parser creation
 this also adds --help, but that seems fine
 also some error cleanup

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
2 years ago
Brian Coca 3b9592fcaf
Move to display as single source of verbosity (#77498)
* Move to display as single source of verbosity

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Matt Clay 32d67ce998 Exclude Python 2.6 from interpreter discovery. 2 years ago
htol d7fbde4ea9
Make "~/.ansible" path configurable (#76114)
* replace hardcoded '~/.ansible' to C.ANSIBLE_HOME
* rename previously existing env ANSIBLE_HOME in env-setup script
* modify cache dir monkeypatching in galaxy api unit tests
* update "version_added" to 2.14 for ANSIBLE_HOME
* fix description of collections with proper use of ANSIBLE_HOME

Co-authored-by: htol <github@h-tol.net>
Co-authored-by: stefanwascoding <stefan@syntaxhelden.de>
2 years ago
Corubba 94138cf608
template override colon bugfixes (#77495)
* Proper error on missing jinja2 override separator

Properly catch the case when no (or a wrong) separator is used in a
jinja2 override, and return a useful error message to the user.

* Support colons in jinja2 override value

By limiting the split to 1, any colons in the value are preserved and
passed on.
2 years ago
Martin Krizek 94eff70030
PlayIterator - remove deprecated states (#77444) 2 years ago
Sloane Hertel 477c55b0d2
Get git executable for collections in git repos (#77493)
* Fix traceback installing collections from git repos if git is not installed
2 years ago
Martin Krizek a85261342a
template module: document jinja2_native behavior (#77445) 2 years ago
Martin Krizek c7e198b907
Ensure correct environment_class is set on Template (#77485) 2 years ago
Sloane Hertel 62fe4718cb
Fix ini section for INVENTORY_UNPARSED_WARNING (#77478) 2 years ago
h4rr21 1d9c68d27e
honor use_proxy parameter (#77312)
* honor use_proxy parameter
* fix uri test with "use_proxy: no"
* fix urls.py module

Co-authored-by: Carlos <Juan.Carlos.Cardenas.Viera@ibm.com>
2 years ago
Jon "The Nice Guy" Spriggs 5b44035983
Hide "[WARNING]: No inventory was parsed" message (#65499)
* Add config option INVENTORY_UNPARSED_WARNING to hide the warning "No inventory was parsed, only implicit localhost is available"
2 years ago
Martin Krizek dce30e2577
Remove deprecated Load-CommandUtils and Import-PrivilegeUtil (#77457) 2 years ago
Martin Krizek cdf998fa79
cli - deprecated setting verbosity before sub command, cont'd (#77456)
Follow up on #75840
2 years ago
Martin Krizek f41636b9b8
Remove deprecated UnsafeProxy (#77455) 2 years ago
Filip Chyla 3fe5f577e6
make collection warning message clearer (#74859) 2 years ago
Martin Krizek 9f82fc204b
apt_key: remove deprecated key module param (#77409) 2 years ago
Martin Krizek f933f9a178
get_url: remove deprecated sha256sum module param (#77408) 2 years ago
Matt Martz e3aa73cb97
Catch ImportError when pyyaml doesn't have libyaml extension (#77434) 2 years ago
Martin Krizek 26149c45df
import_playbook: remove deprecated free form params (#77431) 2 years ago
Inclusive Coding Bot eeef3110b2
Switch to gender neutral terms (#77430)
* Switch to gender neutral terms

* Update _selectors2.py

* Update foreman.py

* Update foreman.py

Co-authored-by: inclusive-coding-bot <inclusive-coding-bot@github.com>
2 years ago
Martin Krizek d4dd4a82c0
Remove deprecated default.plugin_filters_cfg config option (#77429)
* Remove deprecated default.plugin_filters_cfg config option

Fixes #77398

* Fix tests
2 years ago
Martin Krizek a421a38e10
Remove deprecated NETWORK_GROUP_MODULES env var (#77428)
Fixes #77397
2 years ago
Martin Krizek f2387537b6
Remove deprecated DISPLAY_SKIPPED_HOSTS env var (#77427)
Fixes #77396
2 years ago
Martin Krizek ff8a854e57
Remove deprecated LIBVIRT_LXC_NOSECLABEL env var (#77426)
Fixes #77395
2 years ago
Sloane Hertel 87a8fedd94
Fix type for ansible-galaxy server config definitions (#77424)
* Fix type for ansible-galaxy server config definitions

* changelog

* check attr without api call

* pep8
2 years ago
Martin Krizek 6d260ad967
Remove COMMAND_WARNINGS and warn (#77411)
* Remove COMMAND_WARNINGS and warn

Fixes #77394
2 years ago
Martin Krizek e080bae766
Remove deprecated ALLOW_WORLD_READABLE_TMPFILES config option (#77410)
Fixes #77393
2 years ago
Jordan Borean 60b4200bc6
winrm - ensure callers PATH for kinit is set (#77401)
* winrm - ensure callers PATH for kinit is set

* Fix unit test expectations

* Fix type annotation
2 years ago
Sloane Hertel f8ec660e62
[ansible-galaxy] Fix listing collections with null namespace/name/version metadata (#77014)
* Fall back to implicit namespace.name from the path if the metadata is invalid

* Test listing a collection with null namespace/name/version fields in its galaxy.yml
2 years ago
Sloane Hertel 87d52e0ce0
Only require a keyring if collections with signatures will be installed (#77355)
Fixes #77349
2 years ago
Matt Clay 50d4cf931c
Start of 2.14 development cycle. (#77378)
* Delete old changelog fragments.
* Add 2.14 changelog stub.
* Add porting guide.
* Update version and codename.
* Add temporary deprecated version ignores.
2 years ago
Matt Martz 4723eb9caa
Add family fallback for RHEL to register as RedHat (#77371)
* Add family fallback for RHEL to register as RedHat

* Update tests to properly assert RHEL behavior
2 years ago
Sandra McCann f03624e295
clarify how to customize ansible cli output (#77357) 2 years ago
Felix Fontein babc26adc1
Handle errors during ansible-doc --metadata-dump more gracefully (#77035)
* Add option --no-fail-on-errors to return errors for ansible-doc --metadata-dump in JSON result instead of failing.

* Adjust changelog fragment.

* Add basic tests.
2 years ago
Matt Martz afecc6400e
Action Plugin argspec validation (#77013) 2 years ago
Brian Coca 4635c75ef7
log results for get_best_parsable_locale (#77319)
* log locale outcomes from function
* also included variant forms of same prefs
2 years ago
Jordan Borean ff184b0815
SID - Use literal UPN value when attempting a user to SID lookup (#77334) 2 years ago
James Milligan ea7f24a1d5
Support ignoring of certificates for ansible-galaxy during SCM cloning (#67616)
* Support ignoring of certificates for ansible-galaxy during SCM cloning

* Add integration tests installing a role from an untrusted repository

Test installing the role without --ignore-certs fails
Test installing the role with --ignore-certs is successful
2 years ago
Sloane Hertel f96a661ada
ansible-galaxy - add configuration options for more flexible collection signature verification (#77026)
* Add a toggle to control the number of signatures required to verify the authenticity of a collection

* Make the default number of required valid signatures 1

* Add option to make signature verification strict and fail if there are no valid signatures (e.g. "+1")

* Use a regex to validate --required-valid-signature-count

* Add a toggle to limit the gpg status codes that are considered a failure

* Update documentation and changelog

* Add unit and integration tests for the new options

* Fixes #77146

Fix using user-provided signatures when running 'ansible-galaxy collection verify ns.coll --offline'

Add a test for a user-provided signature when running ansible-galaxy collection verify with --offline

Fix displaying overall gpg failure without extra verbosity

Add a test for displaying gpg failure without verbosity

Improve documentation to be more clear that signature verification only currently applies to collections directly sourced from Galaxy servers
2 years ago
Till Maas bf00a14f91
linux networking facts: Provide IPv4 prefix (#77193)
For IPv6 addresses, Ansible already provides the prefix length for IP
addresses in the `prefix` fact. This patch adjusts the facts for IPv4
addresses to also contain the prefix length in the prefix fact. This
makes it easier to use the facts consistently when the CIDR notation is
needed.

Signed-off-by: Till Maas <opensource@till.name>
2 years ago
Felix Fontein 4baf18c573
Remove more Python 2.x compatibility code from controller. (#77320) 2 years ago
Matt Martz c1a34d5a63
Update systemd strategy to not confuse NetworkManager (#77243)
* Update systemd strategy to not confuse NetworkManager. Fixes #76958

* Add tests
2 years ago
ChanthMiao 34e60c0a7a
ansible_distribution: Add support for Uos/Deepin (#77275)
* ansible_distribution: Add support for Uos/Deepin

* Add changelog fragment.
2 years ago
Felix Fontein 4d984613f5
validate-modules for plugins: do some more schema validations so that some issues that are currently reported for modules are also reported for plugins (#77268)
* Add more sanity tests on schema level (so they also work for plugins).

* Fix various issues the sanity test reported.

* Add changelog fragment.

* Fix function name.
2 years ago
Felix Fontein e3c72230cd
unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271)
* Fix io_buffer_size option.

* Remove ignore.txt entry by adding action plugin only options to module's argument spec.

* Add changelog fragment.

* Adjust unit tests.
2 years ago
Brian Coca 94b73d66d5
inventory manager respect --flush-cache (#77083) 2 years ago
Martin Krizek c9db73f04e
Add a YAML representer for NativeJinjaText (#77282)
Fixes #77280
2 years ago
bluikko 496f51ceac
get_url fix word emphasis on documentation (#77247) 2 years ago
Matt Clay 6f445ca6e5 Remove obsolete Python 2.x controller code. 2 years ago
Matt Clay f68c66a3ef Remove collections compat from controller code. 2 years ago
Matt Clay 822fddd627 Fix yaml loader and compat. 2 years ago
Matt Clay 27923aad7e Add inline type hint ignores. 2 years ago
Matt Clay 2a2b7dc42a Update include role to match the base class.
Use frozenset instead of tuple.
2 years ago
Matt Clay 4867ac217b Code cleanup for type hinting issues. 2 years ago
Sloane Hertel 8063643b4c
Fix collection redirects for filter and test plugins (#77210)
* Fix collection redirects for jinja2 filters/tests

* Handle recursive redirects

Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Matt Clay 7c81a652c0 Type hint fixes. 2 years ago
Matt Clay 3a3c496ade Remove obsolete Python 2.x compat code. 2 years ago
Matt Clay 0c4c18bc04 Type hint fixes. 2 years ago
Matt Clay 8b2e628565 galaxy - Clean up type hints and imports. 2 years ago
Pierre Blanc ea66cf189b
Fix ansible console to respect ANSIBLE_STDOUT_CALLBACK (#77182)
* Fix ansible console to respect ANSIBLE_STDOUT_CALLBACK

This makes the ansible-console able to customize the stdout callback.
Ansible console currently uses statically minimal callback.

* Add changelog

* Move the fragment changelog in the right directory
2 years ago
Matt Clay 871b2ca73a Simplify existing type hints. 2 years ago
Matt Clay ccdb552d90
More type hint fixes for module_utils. (#77198)
* Type hint fixes for module_utils.
* Fix type hints in module_utils.facts.
2 years ago
hfinucane 86f00bd156
Update example to work (#77191)
`with_first_found` only takes a list of things, it's not like `tags`
where it can take a thing or a list of things.

Inspired by locally discovered breakage and then finding
https://github.com/ansible/ansible/issues/77136 where someone was also
doing this and getting into trouble.
2 years ago
Matt Clay e314f4e666
Add typing to module_utils.compat. (#77197) 2 years ago
Matt Clay 5a1b891917
Additional type hinting cleanup. (#77188) 2 years ago
Martin Krizek 74a204e6f1
first_found: allow spaces in names (#77141)
* first_found: allow spaces in names

Fixes #77136
2 years ago
Matt Clay 1286513947 module_utils - Fix type hinting issues. 2 years ago
Matt Clay 8e45925415 hostname - Use base class on UnimplementedStrategy
This requires moving UnimplementedStrategy below BaseStrategy and Hostname below UnimplementedStrategy.
2 years ago
Matt Clay 35ef2af0ce
Fix type hints and variable usage in modules. (#77184)
* Remove unused variables.
* Fix conflicting variable name.
* Add type hints.
2 years ago
Matt Clay 6de04e8be6 Fix module exception handlers.
Exception handler variable names should not conflict with other variables.

Use Python 2.6+ exception handler syntax.
2 years ago
Matt Clay d31730d781
Fixes for type hinting issues. (#77170) 2 years ago
Sloane Hertel 7657caa072
Fix 'ansible-galaxy collection verify' to display new files/dirs (#76690)
* Fix 'ansible-galaxy collection verify' to report files/directories not listed in the FILES.json

* changelog

* Fix bug in 2.13+
2 years ago
jbpratt 28a278ee48
fix spelling error in details (#77152)
correct inventory_hostname spelling error in include_vars and set_fact
modules

Signed-off-by: jbpratt <jbpratt78@gmail.com>
2 years ago
Matt Clay 43c2c983cc Fix type hints in galaxy. 2 years ago
Elijah DeLee 3f924b59f2
use same timeout for galaxy api interactions (#77088)
Also, bump the default. A number of people have reported problems with
this 20 second timeout for a couple of years on
https://github.com/ansible/galaxy/issues/2302

It is mentioned in the issue that resolving dns can sometimes take up to
30 seconds, and that this timeout includes dns resolution.

Includes a changelog message
2 years ago
Abhijeet Kasurde 4f48f375a0
parameters: handle blank values when argument is a list (#77119)
Fixes: #77108

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Emmanuel Benoît d60efd9768
hostname module - fix TypeError in FileStrategy (#77025) (#77074)
* Use file_get_content() to read the file containing the host name
2 years ago
Günter Grodotzki 0bb70b6b9f
AL2022 package-manager detection support (Amazon Linux) (#77050)
* AL2022 package-manager detection support (Amazon Linux)

* try/except

* use major_version

* check if dnf exists + add changelog fragment

* analogue logic
2 years ago
Brian Coca 143904f49b
More informative playbook attribute errors (#77082)
* More informative playbook attribute errors

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Matt Martz 8cbe1435c2
Use full python package for ansiballz cache filenames (#77090)
* Use full python package for ansiballz cache filenames

* Be a little more explicit about test goals
2 years ago
Felix Fontein ff25b51178
Fix example return value in docstring. (#77076) 2 years ago
Pablo Escobar Lopez f2612ce169
apply owner/group permissions to top folder with unarchive module (#73024)
* apply owner/group permissions to top folder
* remove unused var unarchive30
* fix permissions for top folders if the tarball include multiple top folders
* added test for top folder ownership
2 years ago
gcagle3 c688eb824b
Add basic support for "apt-get clean" operation to apt module (#76758)
* adding apt-get clean functionality

 documentation and example
2 years ago
Martin Krizek 18251f3685
dnf: ensure releasever is passed into libdnf as str (#77024)
Fixes #77010
2 years ago
Matt Martz 3779c1f278
restore inadvertently deleted default for convert_data. Fixes #77004 (#77016) 2 years ago
Brian Coca c9d3518d2f
Fix final fact delegation (#77008)
* fix facts delegation loop overwrite

 partial revert of change to allow facts to be present in each loop iteration
 was not needed in final results as result processing alreayd had the disctiontion
 and ended up breaking the assumptions in the calling code.

 fixes #76676
2 years ago
Brian Coca 56edbd2bbb
Handle connection dissonance (#77005)
* play_context, compensate for existing plugins

 some connection plugins are not fully using the correct configuration,
 but this was previously hidden from them as play_context was providing
 the info instead, now play_context provides the 'correct' info, but hitting
 these bad configurations.
2 years ago
Sloane Hertel 43e55db208
ansible-galaxy - add signature verification of the MANIFEST.json (#76681)
* ansible-galaxy collection install|verify:

  - Support verifying the origin of the MANIFEST.json when the Galaxy server has provided signatures.
  - Allow supplemental signatures to use during verification on the CLI/requirements file.

* ansible-galaxy collection install:

  - Support disabling signature verification. This silences the warning provided by ansible-galaxy if the Galaxy server provided signatures it cannot use because no keyring is configured.
  - Store Galaxy server metadata alongside installed collections for provenance. This is used by 'ansible-galaxy collection verify --offline'.

* Add unit tests for method that gets signatures from a Galaxy server

* Add integration tests for user-provided signature sources

- Test CLI option combinations
- Test installing collections with valid/invalid signature sources
- Test disabling GPG verification when installing collections
- Test verifying collections with valid/invalid signature sources

* Make signature verification advisory-by-default if signatures are provided by the Galaxy server

- Make the default keyring None
- Warn if the keyring is None but the Galaxy server provided signatures
- Error if the keyring is None but the user supplied signatures
- Error if the keyring is not None but is invalid

* changelog

* add ansible-galaxy user documentation for new options

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Andy Mott <amott@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
2 years ago
Jack Scheible d35bef68f5
replace - always return rc (#71963)
* Return rc=0 on success.

Error handling in playbooks generally expects `rc` to be set to 0 when a module has not failed.  Playbook authors should not have to check for the existence of `rc` first.

* Use single definition and added changelog

* Fix up tests with new return value

Co-authored-by: Jordan Borean <jborean93@gmail.com>
2 years ago
Thomas Sjögren b145732973
Resubmit: Use SystemdStrategy for Debian in the hostname module (#76929)
* add DebianStrategy tests
* ensure hostname can be changed by using become
* use Systemd strat for debian and Base for generic.
* add test to ensure all strategies are available

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
2 years ago
Stephen Ryan 522f9d1050
Make builtin.file modification times support check_mode (#76973)
* Make builtin.file modification times support check_mode
* Add integration test
2 years ago
Brian Coca 699ecb8308
improve warnings from service_facts (#76921)
be more permissive, allow query more statuses
might create a slew of warnings though, but can depend on
how individual services are permissioned
2 years ago
Brian Coca 47faa6e206
clean_facts only show variable name (#76974) 2 years ago
James T Snell eb093ae7c3
Added a powershell example for ansible.builtin.script (#76980)
* Added a powershell example

None of the examples are of a form that actually works with powershell/windows hosts. The added last example actually works with Windows hosts and Ansible. Inspired by: https://devops.stackexchange.com/questions/15409/ansible-how-to-run-local-powershell-script-on-remote-hosts

* Trivial PEP fix
2 years ago
Matt Martz 8582df36c5
Remove misleading note in template doc fragment. Fixes #61233 (#76955) 2 years ago
Brian Coca d4c9c103e2
ansible-pull handlle empty node/hostname return (#76965) 2 years ago
Brian Coca 6d2d476113
avoid polluting vars with incorrect settings (#76590)
avoid polluting vars with incorrect settings

 simplify variables and templars
  - variables, original, only updated with final results, reset are copies of this
  - tempvars used for preliminary templating
  - cvars used for connection/shell/become plugins, delegation aware
  - vars_copy ignore tempvars updates and use connection plugin to get 
    finalized version per loop item/delegation,  also used to store temp results
    till we are ready to update 'variables'
 - fine tune nolog just cause we are here
 - also fix inventory_hostname_short for IP addresses
2 years ago
Brian Coca b493c590bc
Bypass fragile git ssh wrapper (#73404)
git module now uses env vars exclusively

  - updated docs to clarify usage
  - now env vars append instead of overwrite to allow existing custom setups to keep working
    fixes #38104, #64673, #64674
  - added note for hostkeychecking more securely
    fixes #69846
  - keep script cause old versions still choke on env
  - env var cannot hold more than 'command' for older versions
  - all ssh_opts in one place
2 years ago
Brian Coca be19863e44
ssh connection: use 'correct' host in all cases (#76017)
ssh plugin, use 'correct' information source in all cases
  * still fallback to pc
  * added inventory to new test
  * undef var can still show as parser error on pc
    now task_exectuer has a  more accurate error handling
2 years ago
Brian Coca 5bddecb048
gather_facts sees collection networking connection (#76954)
needed to properly propagate some arguments by convention: subset, filter

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Martin Krizek 394d216922
add_host/group_by: fix using changed_when in a loop (#71719)
Fixes #71627
Fixes #75971
2 years ago
Alexander 53e4760b8c
More accurate help message for verbosity setting (#76887) 2 years ago
Brian Scholer cbb994f174
make Ansible.Basic work on non-Windows (#76924) 2 years ago
Matt Clay 41db6d8d35 Fix task path unicode error in junit callback. 2 years ago
neikei 3c8861d1ba
Fixed handling of sleep arguments during service restarts on AIX (#76878)
Fixes #76877
2 years ago
Abhijeet Kasurde ea34fdbfe2
Misc typo fixes in plugins directory (#76566) 2 years ago
Matt Clay fbb5d56bd2
ansible-test - Use relative paths in junit output. (#76871)
* ansible-test - Use relative paths in junit output.

Also fix a traceback in the junit callback during automatic fact gathering.

* ansible-test - Handle out-of-tree JUnit paths.
2 years ago
Abhijeet Kasurde fee90b15a2
Misc typo fixes in module_utils (#76564) 2 years ago
Brian Coca b1d6750e8b
fix block var inheritance (#75287)
* updated tests to conform to new block inheritance

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Brian Coca 29b5eb6ba9
updated metadata dump to do full docs dump (#76170)
* minor refactor in other options by pushing common code into functions
 * consolidate coll_filter
 * more normalizing loader
 * dont pass plugin_loader, its global import
 * Also dump roles and collections
 * adjusted tests to new err msg
 * disable namespace filter (unused)
2 years ago
Martin Krizek 3816815db0
Track failures in the includes results to avoid special handling of include errors (#53688)
* Make include_role/include_tasks work with any_errors_fatal v2

Fixes #50897

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

* Add failed to results in free strategy too

* Fix

* Avoid duplicating results

* ci_complete

Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Martin Krizek f501b579e5
ansible-vault encrypt_string: fix --output to write into file (#76856)
Fixes #75101
Fixes #59590
2 years ago
Mads Jensen 07bcd13e6f
Replace file handling with context managers in files-modules and parsing vault. (#65371) 2 years ago
Felix Fontein ee80e856c2
Remove more whitelist and blacklist occurances (docs only). (#76845) 2 years ago
Syed Ali Haider 6bca0a5dc2
docs: add fqcn to module examples (#73546)
Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Martin Krizek 29de2cccba
Fix task debugger to work with run_once using linear strategy (#76814)
* Fix task debugger to work with run_once using linear strategy

Fixes #76049

* Fix clog

* Add integration test
2 years ago
neikei 73dd2c3607
Added restart to the argument condition for AIX (#76841)
* Added restart to the argument condition for AIX

This should fix the issue https://github.com/ansible/ansible/issues/76840
2 years ago
Daniel Goldman dbde2c2ae3
user module password expiration fixes (#75390)
* allow inputting 0 for password_expire_{min|max}
   0 is meaningful for min days (any time)   
   0 is technically valid for max_days
* add test for setting both min and max expiry
* [0] return result of execute_command from set_password_expire*
* [1] better return for set_password_expire
* [2] handle returns from set_password_expire*
* only set password expiry if user exists
* collect return-handling code
* combine password min and max into one execution
* handle case where spwd is not present like on macOS and FreeBSD

Co-authored-by: Sam Doran <sdoran@redhat.com>
2 years ago
Éloi Rivard 3889ddeb4b
iptables - added a ``chain_management`` parameter to control chain (#76378)
creation and deletion

fixes #25099
closes #32158
2 years ago
Kenyon Ralph d5a740ddca
doc_fragments/files.py: fix "objecs" typo (#76822) 2 years ago
Brian Coca 04d4900518
config, moved 'choices info to keys (#76569)
* config, moved 'choices' from wall of text, to keys
* updated to ensure all pythons handle the 2 modes correctly
* Update lib/ansible/config/base.yml

Co-authored-by: Sandra McCann <samccann@redhat.com>
2 years ago
Brian Coca 864c2591b6
Use explicit keyword for plugin config (#75158)
* go back to keyword being explicit for plugin configs instead of using option name as implicit match
* switch spec to singular, no changes needed since no one used
2 years ago
Matt Martz 96ce4804ee
Resolve perf issue with async callback events (#76783)
* Don't send full task with async callback events. Fixes #76729

* Use args for async_status task, instead of k=v

* Make sure we send back the async task attrs for polling

* Add clog frag

* load is a staticmethod
2 years ago
Matt Martz d7d1bd6269
Fallback to os family for interpreter discovery distro map. Fixes #75560 (#76815) 2 years ago
Abhinav Tripathy 8c06aada10
Module Logging with WSL2 (#76375)
* adding systemd daemon import

* adding coments and AttributeError exception

* adding minor fix to repeated syntax

* adding changelog
2 years ago
Martin Krizek 8febd37f32
Attach concat func to an environment class (#76282)
* Attach concat func to an environment class

ci_complete

* clog and docstrings
2 years ago
Matt Martz 9f46f6eb30
Attempt 2: Catch errors getting filters and tests (#76806) 2 years ago
Matt Martz 374720fc97
Do not require SystemdStrategy subclasses for every distro (#76800) 2 years ago
Mark Mercado 36519ff95e
Parameterize disable_lookups (#76770)
Allow inventory plugins to enable/disable lookups in the compose templating
2 years ago
Matt Martz 29bdb8bf1e
Compare FQCN also in lockstep logic. Fixes #76782 (#76787) 2 years ago
Julian 6de06377d0
Fix documentation around the password parameter of builtin.user (#76702) 2 years ago
Sebastian Wiesinger 2e0fb34937
Change "fatal" to "error" in config docs to match actual behaviour (#76760) 2 years ago
Brian Coca 89c884e2a2
include_vars initialize failed (#76754)
* include_vars initialize failed

  if source dir is given, but not present and traversal is empty you
  can end up trying to access failed w/o it ever being defined.

  also future proof for more corner cases in decision tree
2 years ago
Brian Coca 4676c08f18
prevent fact gathering from breaking on bad caps (#76691)
* prevent fact gathering from breaking on bad caps

 fxies #75832
2 years ago
Brian Coca 2246ed9678
ansible-config avoid _terms and _input in --only-changed (#76597)
dont display _terms or _intput on only changed
 those always change and it expected for the plugins that support them


Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Brian Coca 0ff80a15ba
ssh connection avoid parsiing own debug (#76732)
- Avoids false positives on become strings being echoed back 
   by ssh cli itself
  - added test for debug lines
  - also simplified some of existing test code
2 years ago
Brian Coca 9142be2f6c
Allow specifying specific python via shebang (#76677)
modules with python were always normalized to /usr/bin/python,
  while other interpreters could have specific versions.

* now shebang is always constructed by get_shebang and args are preserved
* only update shebang if interpreter changed
* updated test expectation
* added python shebang test
2 years ago
jkahrs c8dd96b076
fact gathering, prevent "UnboundLocalError: local variable 'datafile' referenced before assignment" when open(path) fails. (#76751)
Co-authored-by: jean kahrs <j.kahrs@hosting.de>
2 years ago
Adrian Likins 20cc87f059
Expect upper case message 'levels' for galaxy publish results (#63530) 2 years ago
Amir.M 71f3996778
Added AIX CA certs search paths (#69776) 2 years ago
Sloane Hertel 76220c4a7b
ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server (#76735)
* ansible-galaxy - fix the --ignore-certs flag for the implicit galaxy server

* changelog

* Add a test without the server config

* Fix respecting --ignore-certs for individual --server URLs also

* Update changelogs/fragments/76735-ansible-galaxy-fix-ignore-certs.yaml
2 years ago
StopMotionCuber f2c8b59eb1
Add Rocky to INTERPRETER_PYTHON_DISTRO_MAP (#76728) 2 years ago
Martin Krizek f78deccec2
end_play: end the current play only (#76674)
Fixes #76672
2 years ago
Patrick Hemmer 4a62c4e3e4
apt: add support for package version >= (#75002)
This adds the ability to specify a package version using >=. This will ensure the package is at the specified version or above.

* If the package is not installed, the latest version will be installed.
* If the package is installed and less than the specified version, it will be upgraded.
* If the package is installed and greater than or equal to the specified version, it will be left alone.

The version selection is handled by Apt itself, so things like the system policy, pinning, etc, are considered.
2 years ago
Brian Coca a5bea8b2f5
fix typo (#76699) 2 years ago