Commit Graph
51887 Commits
Author SHA1 Message Date
e7a3715a90 recursive_diff: handle error when parameters are not dict (#74801)
Co-authored-by: Sam Doran <sdoran@redhat.com>
2021-07-09 10:37:50 +05:30
Brian CocaandGitHub ac151e5ad0 become/su: Tell users not to include colon in customized list (#75084)
* Tell users not to include colon in customized list,  fixes #75076
2021-07-08 14:55:46 -05:00
Martin KrizekandGitHub 8ab418f41b Disable jinja2_native warning in CI (#75214) 2021-07-08 15:15:55 -04:00
Sam DoranandGitHub 93e72c96f0 Update hacking env_setup to prefer Python 3 (#75213)
* env_setup - Prefer Python3

Prefer the 'python3' executable over 'python'.

* Add shebang for syntax detection

While the script isn't executable and we recommend sourcing it, having a shebang allows
variuos text editors to detect that it is a shell script and apply proper syntax highlighting.
2021-07-08 15:14:34 -04:00
Christian AdellandGitHub 3ba2243ba3 Replace self.module by my_module (#75196)
While implementing basic Ansible module testing I realised that the `self.module` used in some places is not actually a thing, and I changed to `my_module` to make it work as I understand it was expected.
2021-07-08 15:07:49 -04:00
LydieandGitHub 1e00099753 Removed Galaxy banner (#75163) 2021-07-08 11:22:19 -05:00
Felix FonteinandGitHub 67bc49e001 Restrict packaging to < 21.0 for Python < 3.6. (#75186) 2021-07-07 09:19:05 -04:00
Sloane HertelandGitHub bd03fa811b Include parent role vars as well as _role_vars (#75034) 2021-07-06 15:36:28 -05:00
Abhijeet KasurdeandGitHub 21ba2967de Misc typo fixes (#75188)
Changed `Previouslly` to `Previously`.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-07-06 10:43:57 -04:00
Sam DoranandGitHub a8de35e131 task_executor - use correct value for ssh connection retries (#75155)
Since the task and connection both have the same 'retries' keyword, the task default
would override the connection value.

Do not pass 'retries' from the task to the connection options.

* Set ssh_connection retries default value back to 0
  It was 0 before the move to config and was changed to 3 by accident.
2021-07-06 10:43:25 -04:00
Toshio KuratomiandGitHub 23a84902cb Update the porting guide for a new ansible version (#75143) 2021-07-01 10:39:42 -05:00
363c1a3fba Vaultfilters (#74998)
add vault and unvault filters

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-30 10:24:00 -04:00
60c9f045cc Unfrack extra vars (#75127)
* Ensure we keep teh original path as per cli

  fixes #75126

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-30 09:39:11 -04:00
Todd WaltonandGitHub d9eb846534 Update vault script (#75074)
Update link to the `vault-keyring-client.py` file, which moved out of core.
2021-06-29 15:46:16 -05:00
Sviatoslav SydorenkoandGitHub d75d9443fc Bump sphinx_ansible_theme to v0.7.0+ (#75059)
This version relies on an external lib implementing lexers and styles.
That lib pulls in proper Pygments version so this patch also drops it
from direct requirements.
2021-06-29 10:23:04 -05:00
Andreas OlssonandGitHub 2eb9921b19 Prefer https:// links in the docs site (#75121)
This is a follow-up of previous years' 1a11cec and c8315bf. It deals
with links which at that point presumably either were not present or
did not support https://
2021-06-29 12:53:08 +05:30
Martin KrizekandGitHub f176cc1eda Remove create-repo.py script as it was changed to module (#75124) 2021-06-28 13:25:25 -04:00
Sam DoranandGitHub 16a74b798c module_common - handle cache directory creation collision (#75106)
* module_common - handle cache directory creation collision

Occasionally multiple workers can try to create the cache directory if it exists. Catch the exception
and handle it.

* Just re-raise if it doesn't exist rather than trying again

* Use exists_ok rather than handling an exception

* Remove unused import and unused variable

* Go back to try/except but with OSError

Since we do not have split controller remote, this needs to be able to run in Python 2 in order
to be merged currently.
2021-06-25 15:36:12 -07:00
230c00e937 README optimizations (#75115)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-06-25 13:03:39 -04:00
Dirk SchäferandGitHub 29592aa3d4 Update YAMLSyntax.rst (#75113)
fix yaml-syntax example
2021-06-25 10:39:11 -05:00
Martin KrizekandGitHub 03cb40e712 Fix baseurl handling in yum_repository test (#75096)
Since we moved yum_repository_test_repo.baseurl to file:/// format,
using urlsplit filter on it returned an empty string. Using an empty
string as a left operand of `in` was then always evaluated to True.

This was discovered with native jinja being on where urlsplit returns
None which results in a hard fail as None cannot be a left
operand of `in <string>`.
2021-06-25 05:19:24 +10:00
Sloane HertelandGitHub 865bda3a11 Add a resolved_action task attribute (#74709)
* The resolved_action is the formatted version of the final plugin in the PluginLoadContext's redirect_list

* Collection plugins are represented as FQCN

* Legacy plugins are represented with only the plugin name

* Add tests

* Changelog
2021-06-24 12:51:03 -04:00
Toshio KuratomiandGitHub a4021977ad Fix structure of generic snippet feature (#74932)
* Fix struture of cli/doc.py snippet code.

A couple releases ago, cli/doc.py was modified to mostly conform to the
data processing pipeline steps.  format_plugin_doc() was the biggest
exception in that refactor.  When the snippet code was made generic
instead of being only for modules, the new code should have conformed to
the data processing pipeline too.

* Move the decision to output a snippet to the run() method alongside
  the decision to output a listing versus plugin_docs.
* Move the test for invalid plugin_types to the run() method as it
  affects all snippets in this run, not just a single snippet. (-t can
  only be specified once)
* Rename get_snippet_text() to format_snippet() as:
  * This is the data formatting step
  * The format_snippet() name matches with its conceptual sibling,
    format_plugin_doc().
* Use ValueError inside of format_snippet() to flag unrecoverable errors
  formatting a single snippet.
* Emit a warning when format_snippet() raises ValueError and continue to
  the next snippet.
* If the yaml(?) or toml inventory plugin is specified for snippet output,
  raise ValueError() so that the user sees a warning instead of simply
  seeing blank output.
* Do not modify arguments passed into format_snippet().  This is the
  formatting step so data should not be modified.
* Change _do_yaml_snippet() and _do_lookup_snippet() to operate side
  effect free.
* Fix raising of exceptions when formatting requred options for snippets.

* Unrelated: Use to_text() instead of to_native when calling
  display.warning(). to_native() is used for raising exceptions.  Not
  for display methods.

* Add a changelog
2021-06-24 08:34:46 -07:00
Alicia CozineandGitHub 5d3d9ad8be docs: adds Ansible 5 roadmap (#75075) 2021-06-23 16:53:57 -04:00
Sandra McCannandGitHub ea0ba7bf30 update terminology based on recent IBM Style Guide word list (#75089) 2021-06-23 15:52:38 -05:00
415e08c297 Try to get best usable locale (#75033)
specially for when you have parameters in unicode but need
  to scrape responses, C is still the fallback

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-23 15:49:56 -04:00
Sandra McCannandGitHub f05bcf5693 update intersphinx links for Ansible 4 (#75099) 2021-06-23 14:32:03 -05:00
47c50c38bb Use antsibull-docs devel for devel docs (#74988)
* Require antsibull 0.34.0.
* Remove Makefile comment about the devel docs building only the core
(formerly base) docs; the behavior was updated in ccbfdec334
Currently 'make coredocs' builds core-only docs; 'make webdocs' builds the full docs even on the devel
branch

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2021-06-23 14:31:13 -05:00
Felix FonteinandGitHub 2c0f050b4f Use antsibull sphinx extension (#73170)
* Use antsibull sphinx extension.

* Require antsibull 0.34.0.
2021-06-23 14:27:33 -05:00
Alicia CozineandGitHub 58f26388be Update docs requirements list (#74956)
* removes upper bound on sphinx version
* updates versions of docs build dependencies, adds known good requirements file
* adds instructions for using known_good_reqs file
2021-06-22 13:58:54 -05:00
50b6d28ee1 Config init+ (#74914)
Can now specify plugin/plugin type for list and dump actions
 New 'init' action to create usable config sources 

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-22 12:21:59 -04:00
David ShrewsburyandGitHub 703cb79442 Implement async callbacks (#74953)
* add changelog and output from default callback
* add test
* add comments about TE task
2021-06-22 12:19:32 -04:00
Sloane HertelandGitHub ca6123e0ee Template suboptions in a role's arg spec (#75073) 2021-06-22 17:24:02 +02:00
Chandler SwiftandGitHub 3a8fc2d2be Syntax fixes for docs (#75086) 2021-06-22 20:48:20 +05:30
Abhijeet KasurdeandGitHub b0ae3f8a8d test: Unit tests for validation methods (#75061)
* check_required_one_of()
* check_required_by()
* check_required_if()
* check_missing_parameters()

Fixes: #55994

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-22 17:07:30 +02:00
Nasser AlansariandGitHub 6dbfd73174 YAML representer for VarsWithSources (#68525) 2021-06-22 20:03:18 +05:30
Gonzalo ArrecheandGitHub 0f7f4e7b61 Add comma on role creation docs (#75064)
Adding a comma to make the sentence simpler to read.
2021-06-22 12:07:31 +05:30
Andreas OlssonandGitHub aedc82da98 Clarify Vault password client naming requirements (#75060) 2021-06-22 11:58:54 +05:30
Junegunn ChoiandGitHub 8e755707b9 Add 'hash_behaviour' option to include_vars module (#72944) 2021-06-22 09:29:53 +05:30
Felix FonteinandGitHub c404a9003f ansible-doc: improve version_added handling (#73602)
* Output version_added on top level, and improve version_added formatting

* Handle 'historical' version_added.
2021-06-21 16:27:00 -04:00
Alicia CozineandGitHub a7be495b7b Update plugin docs (#75050)
* edit existing plugin pages, headings, and links
2021-06-21 16:07:18 -04:00
Nathaniel CaseandGitHub ad203a7dbd Add page describing terminal plugins to docsite (#75066) 2021-06-21 09:47:42 -05:00
Sviatoslav SydorenkoandSviatoslav Sydorenko ec408a69f1 🔥 Drop unused core.css file
This is a forgotten leftover from #74318 that should've been removed
earlier.
2021-06-19 10:24:07 +03:00
Ikko AshimineandGitHub 38a11c3240 Fix typo in default_callback.py (#75051)
Changed beggining -> beginning
2021-06-18 10:01:11 +05:30
Sam DoranandGitHub cd473dfb2f play - validate hosts entries (#74147)
* Change tests to pytest-style tests
* Add tests for invalid hosts
* Validate host inputs
  - check for empty values
  - check for None
  - check for values that are not a sequence and are not strings
  - add unit tests

* Move play name setting to get_name() and out of load()
* Add _validate_hosts() method
  By defining this method, it gets called automatically by FieldAttributeBase.validate().
2021-06-17 15:32:56 -04:00
e8ae7211da deprecate FileLock (#75032)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2021-06-17 15:14:41 -04:00
Matt ClayandGitHub ce17498ec5 blockinfile - Remove unused code for Ansible 1.x. (#75040) 2021-06-17 10:32:42 -04:00
Matt ClayandGitHub 5e65d9834b tempfile - Remove unnecessary conditional. (#75039)
Also add integration tests for 100% code coverage.
2021-06-17 09:41:09 -04:00
Sam DoranandGitHub afe6eb574e slurp - improve error code and test coverage (#75038)
* Improve the error handling code

Rather than multiple return paths, have a single return and set the message based
on the type of failure.

* Add another test for non-specific failures

* Reorganize tests so failure tests are in one tasks file

* Remove os.stat() call and add changelog
2021-06-16 15:08:34 -07:00
Sam DoranandGitHub 4ab791d501 command - remove unreachable code and achieve full test coverage (#75036) 2021-06-16 15:06:18 -07:00