Commit Graph

51708 Commits

Author SHA1 Message Date
Alicia Cozine 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
Brian Coca 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 Shrewsbury 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 Hertel ca6123e0ee
Template suboptions in a role's arg spec (#75073) 2021-06-22 17:24:02 +02:00
Chandler Swift 3a8fc2d2be
Syntax fixes for docs (#75086) 2021-06-22 20:48:20 +05:30
Abhijeet Kasurde 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 Alansari 6dbfd73174
YAML representer for VarsWithSources (#68525) 2021-06-22 20:03:18 +05:30
Gonzalo Arreche 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 Olsson aedc82da98
Clarify Vault password client naming requirements (#75060) 2021-06-22 11:58:54 +05:30
Junegunn Choi 8e755707b9
Add 'hash_behaviour' option to include_vars module (#72944) 2021-06-22 09:29:53 +05:30
Felix Fontein 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 Cozine a7be495b7b
Update plugin docs (#75050)
* edit existing plugin pages, headings, and links
2021-06-21 16:07:18 -04:00
Nathaniel Case ad203a7dbd
Add page describing terminal plugins to docsite (#75066) 2021-06-21 09:47:42 -05:00
Sviatoslav 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 Ashimine 38a11c3240
Fix typo in default_callback.py (#75051)
Changed beggining -> beginning
2021-06-18 10:01:11 +05:30
Sam Doran 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
Brian Coca e8ae7211da
deprecate FileLock (#75032)
Co-authored-by: flowerysong <junk+github@flowerysong.com>
2021-06-17 15:14:41 -04:00
Matt Clay ce17498ec5
blockinfile - Remove unused code for Ansible 1.x. (#75040) 2021-06-17 10:32:42 -04:00
Matt Clay 5e65d9834b
tempfile - Remove unnecessary conditional. (#75039)
Also add integration tests for 100% code coverage.
2021-06-17 09:41:09 -04:00
Sam Doran 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 Doran 4ab791d501
command - remove unreachable code and achieve full test coverage (#75036) 2021-06-16 15:06:18 -07:00
Sam Doran 4e608c02fb
Add changelog and porting guide for _remote_checksum() deprecation (#75035)
I forgot to add it with the PR that made the changes.
2021-06-16 16:58:02 -04:00
Sam Doran be0cdc0ea2
deprecate `_remote_checksum()` and remove use in fetch (#74848)
* Remove use of _remote_checksum from fetch module
* Add deprecation message displayed during runtime
* Increase test coverage for fetch
* Add tests covering the use of stat from the fetch module

    This required creating an unpriveleged user account and connecting as that user remotely since
    it is not possible to create a file that the root user cannot stat.

* Use fact caching to persist remote tmp dir across playbook runs
* Add variables to setup_remote_tmp test role to allow caching of the remote temp dir fact
  and preventing removal of the remote_tmp_dir
2021-06-16 13:51:07 -04:00
Brian Coca 5a5a1882d4
Added FAQ entry for complex validation needs (#74707)
* Added FAQ entry for complex validation needs

* updated validate docs

* fix

* longline

* Apply suggestions from code review

Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-06-16 13:43:01 -04:00
Sam Doran 0467b1d477 file integration test - cleanup testing users and group 2021-06-16 10:06:12 -07:00
Gonéri Le Bouder 5b8fb4dcd3 ansible-test: exposes tiny_prefix variable
ansible-test aws provider now creates and exposes a new tiny_prefix
variable to provide a shorter prefix for the AWS tests.
2021-06-16 10:04:58 -07:00
Brian Coca 08fc43f3ea
document keywords (#74046)
* document kewyords

  also minoir tweak to local action/connection

* made corrections
2021-06-16 12:46:21 -04:00
Brian Coca 6fd61bb19f
add option def/handling to lookup (#74495) 2021-06-16 12:44:02 -04:00
Paul Smet 2e2a5829a2
Update FreeBSD Python version in intro_bsd.rst (#74938)
* Use the python pkg instead of a specific version
The python pkg contains a symlink to the default python interpreter.
2021-06-16 11:22:26 -04:00
Alan Hinchliff 3fa6e6d038
example hosts should match play (#74959) 2021-06-16 11:18:44 -04:00
bluikko b0f62062d3
Async task change handling (#75020)
Async task changes should be handled in the async_status task.
2021-06-16 11:16:30 -04:00
Brian Coca 7d38bb05e4
small note about add_hosts/limit interaction (#74978)
clarifying the scope and applicability

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
2021-06-16 11:13:11 -04:00
David Shrewsbury 2387ce311f
remove reference to container ML (#75014) 2021-06-16 10:47:26 -04:00
Andrew Klychkov 5df82415b5
collections_using.rst: add note that manual upgrade is required when installing collections from Galaxy (#75024) 2021-06-16 10:32:12 -04:00
Manuel Gutierrez 4cb20f577b
Fix env lookup docs typo (#75022)
- Fixed "impossbile" typo
2021-06-16 10:00:15 -04:00
Brian Coca 79a0799082
fix typo in host_group_vars config (#75012)
* no need to deprecate, not used directly

  it just documents the use of the setting in loader
2021-06-15 18:03:01 -04:00
Felix Fontein e6a7bc854c
Only consider directories which do have .deps files other than ancestor.deps. (#74987) 2021-06-15 14:35:34 -05:00
Felix Fontein 7f6edd78f9
Move Docker scenario guide to community.docker. (#74736)
The scenario guide has already been added to community.docker in
ansible-collections/community.docker#140
2021-06-15 10:12:49 -05:00
Jordan Borean 58d8397771
psrp - cleanup command (#74985) 2021-06-15 07:33:56 +10:00
Felix Fontein 58450f041a
Do not show empty version_added_collection values in ansible-doc text output. (#74999) 2021-06-14 17:26:40 -04:00
Brian Coca 77e936bd50
async_status revert most changes, keep some fixes, undep module (#74931)
* revert most changes, keep some fixes, undep module

  too many corner cases, reverting major changes for controller
  side processing.
2021-06-14 16:39:59 -04:00
David Shrewsbury 97acb0f470
role argspec - tag role argspec validation task with 'always' (#74994)
* update tag docs
2021-06-14 13:28:56 -04:00
Brian Coca d2d45900ed
setup module, filter compensate for prefixes (#74924)
Allow user to abstract internal implementation from requested info
2021-06-14 09:32:28 -04:00
Jordan Borean cf3a304ce1
psrp - Fix reset connection on failed scenarios (#74967)
* psrp - Fix reset connection on failed scenarios

* Update psrp-reset.yml

* Update changelogs/fragments/psrp-reset.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* Update changelogs/fragments/psrp-reset.yml

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-12 12:01:23 +10:00
Sam Doran a8cf0196f7
subversion - fix stack trace when getting repository information (#74405)
* subversion - set LC_ALL for accurate command output parsing

When LC_ALL is not set, the output language of commands will differ based on locale. There
is a lot of history of trying to fix this. See the following pull requests:

https://github.com/ansible/ansible-modules-core/pull/4358
https://github.com/ansible/ansible-modules-core/pull/4358

This patch attempts to fix this my setting LC_ALL to a UTF-8 locale. Setting LC_ALL to C reintroduces this bug https://github.com/ansible/ansible-modules-core/issues/4178.

I'm sure there are some problems I am not seeing with setting this to en_US.UTF-8, but that is
the only way I could find to fix this bug without reintriducing the bug mentioned above.

* Rather than setting locale, just check for matches before trying to get groups

This is a pragmatic solution to avoid the stack trace since setting the locale correctly
to ensure message parsing is accurate is problematic.

* Improve regexps for finding revision and URL
2021-06-11 10:23:42 -04:00
Sam Doran 9a21e24778
get_distribution - Return distribution for all platforms (#71641)
Since moving to distro, it is possible to return this information for all platforms, not just Linux.
Also return version information for all platfrom not just Linux.
Update unit tests.
Remove some duplicate unit tests though I think there are more to remove.

* Fix docstring formatting

* Minor docstring changes

* Mock distro.id for Solaris service test

* Update comment
2021-06-11 10:22:18 -04:00
Brian Coca 4c8c40fd3d
fix unsafe preservation across newlines (#74960)
* fix unsafe preservation across newlines

  CVE-2021-3583
  ensure we always have unsafe

Co-authored-by: Rick Elrod <rick@elrod.me>
2021-06-11 09:33:40 -04:00
Daniel Ziegenberg 473df5c13f
fix doc: add possible state 'inactive' (#74928) 2021-06-11 14:58:00 +10:00
Toshio Kuratomi 576e0f6404
Update the porting guide for ansible 4.1.0 (#74965) 2021-06-10 19:45:52 -05:00
Brian Coca 675df166c2
fix ssh_transfer_method/scp_if_ssh defaults (#74925)
* fix ssh_transfer_method/scp_if_ssh defaults

  fixes #74922

* clog
2021-06-10 15:22:41 -05:00