Commit Graph

444 Commits (1dd8247fba3fc5e07b65e28bc4b45ddbaa9a93ba)

Author SHA1 Message Date
Sloane Hertel e40889e711
Add support to install collections from git repositories (#69154)
* Enable installing collections from git repositories

* Add tests for installing individual and multiple collections from git repositories

* Test to make sure recursive dependencies with different syntax are deduplicated

* Add documentation

* add a changelog

* Skip Python 2.6

* Only fail if no collections are located in a git repository

Add support for a 'type' key for collections in requirement.yml files.
Update the changelog and document the supported keys and allowed values for the type.

Add a note that the collection(s) in the repo must contain a galaxy.yml

* Add a warning about embedding credentials in SCM URLs

* Update with review suggestions

* suppress sanity compile failure for Python 2.6
4 years ago
Sandra McCann c884c5fddf
add pointer to namespace and collection name restrictions (#69761) 4 years ago
Sandra McCann 3a4e227efa
remove build errors including guess (#69711)
* remove build errors including guess

* fixed shippable errors
4 years ago
Jordan Borean f81f5da20e
Ansible.Basic added generic fragment merger for module options (#69719) 4 years ago
Felix Fontein 40f21dfd3c
Version source tagging (automatic and manual) for version_added and deprecation versions (#69680)
* Track collection for version_added.
Validate *all* version numbers in validate-modules.
For tagged version numbers (i.e. version_added), consider source collection to chose validation.

* Make tagging/untagging functions more flexible.

* Tag all versions in doc fragments.

* Tag all deprecation versions issued by code.

* Make Display.deprecated() understand tagged versions.

* Extend validation to enforce tagged version numbers.

* Tag versions in tests.

* Lint and fix test.

* Mention collection name in collection loader's deprecation/removal messages.

* Fix error IDs.

* Handle tagged dates in Display.deprecated().

* Also require that removed_at_date and deprecated_aliases.date are tagged.

* Also automatically tag/untag removed_at_date; fix sanity module removal version check.

* Improve error message when invalid version number is used (like '2.14' in collections).
4 years ago
Anatoly Pugachev 09f86c1410
docs: communications update (#69687)
* add some more info on IRC support channels to docs
4 years ago
Felix Fontein ea04e0048d
Allow to deprecate options and aliases by date (#68177)
* Allow to deprecate options and aliases by date instead of only by version.

* Update display.deprecate().

* Adjust behavior to conform to tested behavior, extend tests, and improve C# style.

* Parse date and fail on invalid date.

This is mainly to make sure that people start using invalid dates, and we eventually have a mess to clean up.

* C# code: improve validation and update/extend tests.

* Make sure that deprecate() is not called with both date and version.

* Forgot to remove no longer necessary formatting.

* Adjust order of warnings in C# code.

* Adjust unrelated test.

* Fix grammar (and make that test pass).

* Don't parse date, and adjust message to be same as in #67684.

* Sanity tests: disable date in past test.

* Validate-modules: validate ISO 8601 date format.

* Validate-modules: switch schema declaration for deprecated_aliases to improve error messages for invalid dates.

* Use DateTime instead of string for date deprecation.

* Validate that date in deprecated_aliases is actually a DateTime.

* Fix tests.

* Fix rebasing error.

* Adjust error codes for pylint, and add removed_at_date and deprecated_aliases.date checks to validate-modules.

* Make deprecation date in the past error codes optional.

* Make sure not both version and date are specified for AnsibleModule.deprecate() calls.

* Stop using Python 3.7+ API.

* Make sure errors are actually reported. Re-add 'ansible-' prefix.

* Avoid crashing when 'name' isn't there.

* Linting.

* Update lib/ansible/module_utils/csharp/Ansible.Basic.cs

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Adjust test to latest change.

* Prefer date over version if both end up in Display.deprecated().

Co-authored-by: Jordan Borean <jborean93@gmail.com>
4 years ago
Felix Fontein 0e15375ffe
Add deprecated removed_in_version and deprecated_aliases version tests (#66920) 4 years ago
Gonéri Le Bouder e70f5cc132
vmware: example should use FQCN (#69351)
For instance, you should use `community.vmware.vmware_guest` instead of just
`vmware_guest`.

This way, the examples don't depend on the `collections` directive of the
playbook.

Co-authored-by: Sandra McCann <samccann@redhat.com>
4 years ago
Serienmorder 366f808683
Correct debugging modules documentation (#69245) 4 years ago
Sloane Hertel 34458f3569
Update inventory caching documentation (#69100) 4 years ago
Sandra McCann caa263e2cf
Document how to migrate a standalone role to a collection (#68687)
Adds docs for role developers/owners in the collections ecosystem
4 years ago
Felix Fontein abb807e5dd
Extend dev guide for collection testing and collection hacking (#68899)
* Make clear which BOTMETA.yml is meant (some collections also have one), fix itemization, document /rebuild and /rebuild_failed, add section on how to test collections with ansible-test, update supported versions for compile tests, add a section on hacking collections, implement feedback. 

* Update docs/docsite/rst/dev_guide/developing_collections.rst

Co-Authored-By: Felix Fontein <felix@fontein.de>
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
5 years ago
Andrew Klychkov 598ead965d
Dev guide: add notes about different image types for integration and unit/sanity tests (#68663)
* Dev guide: add notes about different image types for integration and unit/sanity tests
* Update docs/docsite/rst/dev_guide/testing_integration.rst

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Ken Dreyer 318d5606c1
doc: explain default "required" value for argument_spec (#68678) 5 years ago
Sandra McCann 8042d226e4
fix make webdocs warnings (#68411) 5 years ago
Sandra McCann 02e36fbfc2
fix broken link in developing collections (#68442) 5 years ago
Matt Davis ed9de94ad9
remove azure extras and extras_require support (#67822)
* remove azure extras and extras_require support

* Since Azure will be collectionized, the requirements will float more frequently than Ansible releases; the Azure collection needs to host the requirements now.
* Removed the dynamic extras support as well, since Azure was the only thing using it. If we need it again, it's easy to pull back from history.

* Mark azure-requirements as orhpaned.

This keeps the docs around so that existing links from old test runs remain valid.

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Alicia Cozine 69543b47c9 fix last 7 docs errors on post-migration test runs (#68115)
* address toc-tree-glob-pattern-no-match errors

* address Include-file-not-found error

* address 2.10 porting guide errors, add warning to page

* updates individual plugin type pages

* Add ignores.

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Abhijeet Kasurde a4da73e961
misc typo fixes (#67775)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Alicia Cozine 75191c1484
fixes link, makes intrapage TOC local (#67664) 5 years ago
Andrew Klychkov 244277addd
dev_guide/developing_modules_best_practices.rst: fix typo (#67639) 5 years ago
Andrew Klychkov 907c98ebcd
/docs/docsite/rst/dev_guide: fix typos (#67643) 5 years ago
Felix Fontein 4373863f25
Module validation: sanity check mutually_exclusive, required_if, required_xxx ... (#66961)
* required_if checks should have three or four parts.

* Validate mutually_exclusive, required_together, required_one_of, required_if and required_by.

* Simplify code.

* Improve messages.

* Add changelog.

* Sanity check.

* Update docs.

* Update ignore.txt.

* Don't continue with tests when terms are not strings.

* Remove ignore.txt entry.

* Make sure validate-modules doesn't choke on things already flagged by schema test.

* Check required_if requirements list for strings.
5 years ago
John R Barker 4844adff9a
Collection developer guide - BOTMETA (#67538)
* Docs: Improve how to migrate and create collections
* Update docs/docsite/rst/dev_guide/developing_collections.rst

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
5 years ago
Abhijeet Kasurde b6753b46a9
Replace 'message' in module parameters (#60051)
* 'message' parameter is replaced by 'commit_message' in grafana_dashboard
* 'message' parameter is replaced by 'notification_message' in datadog_monitor

This change is required since 'message' as parameter name is used internally by
Ansible core engine.

Fixes: #39295 #45362 #47132 #59617

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Sandra McCann a60feeb3c1
Specify lowercase only for Galaxy namespaces (#67485)
* specify lowercase only for galaxy namespaces
* doh... include meta file
5 years ago
Adam Miller 98c1fc9d3a
add a testing section to collections dev guide (#67370)
Signed-off-by: Adam Miller <admiller@redhat.com>
5 years ago
Sandra McCann a6bb3ae291
fix some broken links (#67345) 5 years ago
Roger D. Winans 888a059ee7
Can we simplify _How to test a PR_? (#65383)
Switch the instructions on testing PRs to use the `refs/pull/XXXX/head` refspec as described in [_Checking out pull requests locally_](https://help.github.com/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally#modifying-an-inactive-pull-request-locally).
5 years ago
Wojciech Sciesinski 49e7f9afe2
Link the testing documentation to the module documenting page (#67248) 5 years ago
Sandra McCann 4dd2513371
add info on creating doc fragments in a collection (#67171)
* add info on creating doc fragments in a collection
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
5 years ago
Mark Chappell 5d4d9d40af
ansible-test - Add 'get' to the list of bad choices for state (#66921)
* ansible-test - Add 'get' to the list of bad choices for state

* Changelog fragment
5 years ago
Mark Chappell 1156962cde
Forbid `state=(list|info)` in modules via ansible-test sanity check
PR #66898

This change introduces a new sanity check with code
`parameter-state-invalid-choice` in the `ansible-test sanity`
validator. It enforces modules not to support `list` or `info`
as their `state`.

Co-Authored-By: Sviatoslav Sydorenko <webknjaz@redhat.com>
Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
Mark Chappell 35652ca788 Add tests to make sure that the documented 'elements' matches that defined in argument_spec (#66385)
* Add tests to make sure that the documented 'elements' matches that defined in argument_spec

* Mass-add test/sanity/ignore.txt
5 years ago
Toshio Kuratomi abc8b0ae73 This was changed to python 2.7 but should have remained python 2.6 (#66836)
* Modules are still python-2.6+ unless there's a compelling reason not
  to be.
5 years ago
Mark Chappell 5ff899662d Add sanity test to require elements entry when argument type=list (#66386)
* Require elements entry for lists

* Bulk add initial test/sanity/ignore.txt
5 years ago
Walter Sosa 2dc9841806 doc: Fix tiny typo in example: change --> changed (#66835)
##### SUMMARY
Fixed another tiny typo: change --> changed

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
5 years ago
Jill R ac881b0026 Add section to aws devel guidelines about module_defaults (#66699) 5 years ago
Sam Doran 20eb1dca99
Update Galaxy docs to use "token" rather than "API key" (#66644)
We have called an API token many things. I changed the command line argument to
"--token", so now I'm unifying the documentation. I looked at both Galaxy and
Automation Hub and Galaxy is the only place that still uses the term "API Key",
which it could be argued should change.
5 years ago
Marko Kohtala c423b1f213 dev_guide: Correct path to ansible-test requirements files (#66626)
The requirements path was old due to file relocation in
commit d651bda123.
5 years ago
Sandra McCann 4fedc10035 added guidelines for seo; (#66431) 5 years ago
Xavier PV 9dd548ebb7 Update developing_python_3.rst (#66249)
##### SUMMARY

fix link § redirection

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
5 years ago
Jordan Borean 595ab62ab8
Ansible.Basic - Added deprecated_aliases (#66323) 5 years ago
kaorihinata 3ca4580cb4 Allow no_log=False to silence the no_log warnings for module parameters (#64733)
As AnsibleModule._log_invocation is currently implemented, any parameter
with a name that matches PASSWORD_MATCH triggers the no_log warning as a
precaution against parameters that may contain sensitive data, but have not
been marked as sensitive by the module author.

This patch would allow module authors to explicitly mark the aforementioned
parameters as not sensitive thereby bypassing an erroneous warning message,
while still catching parameters which have not been marked at all by the
author.

Adds tests for various no_log states including True, False, and None (as
extracted by AnsibleModule._log_invocation) when applied to an argument with
a name that matches PASSWORD_MATCH.

Fixes: #49465 #64656
5 years ago
Sandra McCann 0ca79a4234 Clarify how to use the Galaxy token (#65961)
* DOCS: clarify how to use the Galaxy token, with info for installs and api-key
5 years ago
Sandra McCann 80dff8743a fixed some broken links (#66182) 5 years ago
Mark Chappell 458268f4cb AWS Guidelines: Make 'security_token' optional so that they can be run outside of CI (#66107) 5 years ago
Alicia Cozine 40fb46f1e8
fixes import paths for ansible unit testing (#65775)
* fixes import paths for ansible unit testing

* Update docs/docsite/rst/dev_guide/testing_units_modules.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>
5 years ago
Evgeni Golov 057e137998 clarify `returned` value of `RETURN` nlock (#65724) 5 years ago