Commit Graph

52635 Commits (201aba3d0f6801471a3f9ef66eff2b7cc0d77b97)
 

Author SHA1 Message Date
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
Martin Krizek 572bc1354a Fix lazy eval version in integration tests 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
Alexei Znamensky c71faec595
typo in doc (#77672) 2 years ago
Sandra McCann f633b62cbc
clarify latest release (#77577)
* clarify latest release
* fix tables
2 years ago
Matt Clay f7c2b1986c Require blocking IO for ansible CLI. 2 years ago
Matt Clay cc872a57f2 Reduce output from ansible-doc integration test.
This removes about 20K lines of output which are not evaluated as part of the test.
2 years ago
Matt Clay 5c2d830dea
ansible-test - Fix subprocess management. (#77641)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
* Use a Python subprocess instead of a shell.
* Use InternalError instead of Exception.
* Require capture argument.
* Check for invalid raw_command arguments.
* Removed pointless communicate=True usage.
* Relocate stdout w/o capture check.
* Use threads instead of a subprocess for IO.
2 years ago
Jan-Piet Mens f6fb402d1f
Update guide_vultr.rst (#77665) 2 years ago
deosrc cf5f0690f0
Typo fix (#77648) 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 a65fbfad5b
trim down to use sanity test docs requirements file (#77612)
* trim down to use sanity test docs requirements file
* add requirements back
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update docs/docsite/rst/community/documentation_contributions.rst
2 years ago
Sandra McCann d321fa3f15
remove import_play examples from include module (#77597) 2 years ago
David Moreau Simard 709ae7c050
docs: Update porting guide for ansible 5.7.0 (#77646) 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 26fd5a8c3a Revert "ansible-test - Fix subprocess management. (#77638)"
This reverts commit 62d03c8e75.
2 years ago
Matt Clay e2d54d3594
Require blocking IO for ansible CLI. (#77639) 2 years ago
Matt Clay 62d03c8e75
ansible-test - Fix subprocess management. (#77638)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
2 years ago
Matt Clay b8793fa48d Fix use of deprecated antsibull-docs option. 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
Felix Fontein 841bdb74eb
Replace antsibull with antsibull-docs (#77504) 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
Sandra McCann 096393a221
add select distro installs to docs (#77567) 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
Andrew Klychkov 3cbfee7852
community_steering_committee.rst: add new member (#77589) 2 years ago
Matt Clay b960641759 ansible-test - Support multiple coverage versions.
ci_complete
ci_coverage
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 4faa576ee9
Add a test and changelog for non-string host names in yaml inventory files (#77569) 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 191d9a771a ansible-test - Remove more Python 2.7 support. 2 years ago
Sandra McCann 3b0d74c145
Add contributor path page (#77494)
Co-authored-by: Emmanuel Ugwu <32464178+ugwutotheeshoes@users.noreply.github.com>
2 years ago
Kajsa Gauza 0c1cb0e9d4
Fix a broken link and some grammatical errors (#77531) 2 years ago
Matt Clay 94c9106153 Revert "Config, ensure templating happens at functions (#77483)"
This reverts commit 6e5f1d781d.
2 years ago
Matt Martz 789d29e895
Update docs to recommend the TTY for prompts over stderr (#77533) 2 years ago
Brian Coca 762d97f1b8
setup: remove 'any' as seemingly valid option (#77532)
fixes #59783
2 years ago
Sloane Hertel 76273a6b80
Clean up integration tests (#77516) 2 years ago
Junegunn Choi 2ba39fcf8c
Update pip example with standard lowercase http[s]_proxy env vars (#77515) 2 years ago
Brian Coca 2fc73a9dc3
update python devel docs (#77499)
* update python devel docs

Co-authored-by: Sandra McCann <samccann@redhat.com>
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