Commit Graph

2318 Commits (f98874e4f98837e4b9868780b19cf6614b00282a)

Author SHA1 Message Date
Adam Miller 98c1fc9d3a
add a testing section to collections dev guide (#67370)
Signed-off-by: Adam Miller <admiller@redhat.com>
4 years ago
Francisco J. Capdevila ed4fccb308
Fix typo (#67433) 4 years ago
Sam Doran f506fd4730
Add ansible-galaxy collection list command (#65022)
* Start adding ansible-galaxy collection list options

* Working list all collections and list a specific collection

* Nuke debugging cruft

* Use to_text to get a string of the FQCN for sorting

* Improve collection output formatting

- add header
- display collection name and version in separate columns
- width of columns is dynamic based on collection name and version length

* Make role list output match collection output list

- add header
- add columns for role name and version
- make column width dynamic based on name and version length

* remove debug statemnt and extra header

* Revert "Make role list output match collection output list"

This reverts commit a0b3db47bb3b198aafd34c1f1be5b6561af2f928.

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Use validate_collection_path

* Do not warn if a specific collection in found in any search path

* Fix extraneous warning and remove duplicate code

Do not warn when listing a specific collection and it does not exist
in other collection paths.

Restructure the code that loops through collection paths to remove
duplicate conditional code.

* Indicate role path was found

* Use new function name

* WIP Save Point

* Use separate functions for role and collection list

* Wrap error message

There may be a better way to do this besides hard coding a line break, but this
does make the message a lot more readable.

* Add validate_collection_path function (#66441)

* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Fix bad syntax

* Correct docstring

* Bikeshed the names

* Properly list a single role

* Simplify _display_warnings()

Only display warnings. Move exception raise back to each caller.

* Move private methods to private functions

They don't need self, so it makes sense to have them as functions
Get rid of _display_warnings() function since it doesn't do anything worthy of
an independent function.

* Add integration tests for ansible-galaxy collection list

* Fix docs sanity test

* Fix bug where ansible_collections dir does not exist

The path may exist, but if there is no ansible_collections dir inside that path,
an exception was raised in find_existing_collections().

Add integration test for this scenario

* Put execute_list() method back

* Add some informational messages for debugging

* Add unit tests

Units tests for the various private methods in support of collection list

* Start adding unit tests for test_execute_list

* Display collection path when listing specific collection

* Add unit tests for listing all collections and specific collection

- Create fixture for creating test objects
- Add function for controlling os.path.isdir results

* Set defaults for minimum collection widths

Ensure that collections with small FQCNs display correctly.
Add unit tests

* Split up unit tests and fix fixtures

Add more fixtures for mocking objects during the specific collection tests

* Change help message for -p in list subcommand

Give accurate description of what it actually does rather than trying to use language shared between sub commands.

* Disable colorized output in unit test

* Add docs for collection list

* Fix integration test on macOS

The temp file path is really long on macOS, so the warning message gets wrapped
across multiple lines. That make seth grep fail. Switch to matching on a smaller
part of the warning.

* Recreate common path options for collections

Improve help about what the '-p' option does and how it works.

* Remove unnecessary elif after continue statements

* Account for duplicate paths in collections_searh_paths

If someone specifies the same path via '-p' that is the COLLECTIONS_PATHS,
do not list the collections twice.

* Docs updates
4 years ago
Bas f35293c052
Update YAMLSyntax.rst with yamllint (#66622)
* Update YAMLSyntax.rst with yamllint

Co-authored-by: Sandra McCann <samccann@redhat.com>
4 years ago
Ken Dreyer 0485ce9d12
docs: fix path to roles' meta/main.yml file (#67408) 4 years ago
Carsten Rösnick-Neugebauer b625b430f1
Add (more) explicit references to Jinja2 docs in conditionals doc (#61814)
Co-authored-by: Sandra McCann <samccann@redhat.com>
4 years ago
Sloane Hertel 97f011cf94
Add verify subcommand to 'ansible-galaxy collection' (#65618)
* [WIP] Add verify subcommand command to 'ansible-galaxy collection'

* Fix pep8 and use consistent display order

* WIP - docs

* Remove some redundancy in verify display messages by using an error queue for each collection

* Share common code and improve output format

* clean up documentation

* typo

* Apply suggestions from code review

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Move ModifiedContent namedtuple to the global scope

Add a public metadata property

Rename function to _get_json_from_tar_file

* Add some unit tests

* fix using common functions after rebase

* changelog

* Improve efficiency finding specific installed collections

Improve efficiency by only downloading the tar.gz from the galaxy server for comparison after checking that the collection has been installed

Handle multiple collection paths

Fix up tests

* pep8

* reword that for accuracy

* use more common code and verify collection name

* Improve error message and add documentation

* Update unit tests and add coverage for both local and remote collections that are unable to be located

* Only validate collections using the format collection_namespace.collection_name

Fix tests to reflect that

Fix documentation

* Fix a bug when a local collection does not contain a file

* pep8

* Fix formatting

Co-authored-by: Sandra McCann <samccann@redhat.com>
4 years ago
Mark Chappell 90898132e4
CloudRetry/AWSRetry : Disable catching of NotFound exceptions (#67281)
* CloudRetry/AWSRetry : Remove default catching of NotFound exceptions

* Add docs

* Changelog updates from review

* Update unit tests after removing 'NotFound' from default retries
4 years ago
Jordan Borean ed863b377b
win_package: add missing porting guide entries (#67374) 4 years ago
tchernomax 53e043b5fe
combine filter: fine list handling (option b) (#57894) 4 years ago
Sandra McCann a6bb3ae291
fix some broken links (#67345) 4 years ago
Bill Brubaker (wwbrubak) 561f8c1d60
Update macOS installation instructions (#67058)
On macOS Catalina ``pip install --user ansible`` results in warnings and errors. This updates the reference documents to reflect changes Catalina+ with a safe, easy install for Ansible, accessing pip as a module and installing ansible with --user.

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 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).
4 years ago
Piotr Stawarski a0247d13d8
New magic var: `ansible_config_file` (#66085)
* Add `ansible_config_file` magic variable

* Add ansible_config_file to INTERNAL_VARS

* Add changelog fragment

* Update Special Variables docs
4 years ago
Jonas DOREL 29edcdcf5b
Add library in role directory structure (#67030)
* Add library directory to the list of directories in a role
4 years ago
Felix Fontein fd43619f1a
Docs: improve anchors vs. header bar (#67244) 4 years ago
Sriviswajth 070f946745
Update intro_patterns.rst (#67151)
Removed extra quotes from example.
4 years ago
Alex Humphreys 01a6e1c2c9
Mention role defaults file (#67153)
Add info on where role defaults are set; matches the entry for role variables.
4 years ago
Sandra McCann 7ef7c1b5d7
add note on write access to socket_path (#67060)
* Change socket_path error messages to not directly refer to socket_path
* Apply suggestions from code review

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
4 years ago
Mario Lenz 808bf02588
Remove options from some vmware modules that are not used in the code (#67282) 4 years ago
Nilashish Chakraborty 88f0c85228
Remove deprecated attributes from nxos_igmp_interface (#67186)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
4 years ago
Wojciech Sciesinski 49e7f9afe2
Link the testing documentation to the module documenting page (#67248) 4 years ago
JP Mens 585e79942c
Slash missing from /etc/ (#67220) 4 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>
4 years ago
Felix Fontein f725dce936
Clean up FILE_COMMON_ARGUMENTS (#66389)
* Clean up FILE_COMMON_ARGUMENTS.

* postgresql_pg_hba doesn't declare the backup option.

* uri doesn't declare the remote_src option.

* Add documentation.

* maven_artifact seems to use directory_mode, which it doesn't declare.

* Update changelogs/fragments/66389-file-common-arguments.yml
Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

ci_complete

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>
5 years ago
Mitsuru Nakakawaji c55ba658c6
add note for Azure Availbility Zone (#66200)
* add note for Azure Availbility Zone

* Change title

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Update docs/docsite/rst/scenario_guides/guide_azure.rst

Co-Authored-By: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
5 years ago
Jordan Borean 12e3adb23a
win_domain_controller - add a deprecation warning for the log_path option (#67108) 5 years ago
Jordan Borean 78470c43c2
Removed deprecated items in Windows modules (#67105) 5 years ago
Felix Fontein 23b2bb4f4d
docker_container: change behavior for one-port container ranges to be same as docker CLI (#66382)
* Adjust docker_container behavior for one-port container ranges to be similar to docker CLI.

* Add changelog.

* Add documented examples for ports:.
5 years ago
Dick Visser 5b93a14a0f
Add anchor to each parameter row (#66895)
* Add anchor to each paramater row

* Update docs/templates/plugin.rst.j2

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Insert full keys into plugin docs.

* Added visible links.

Co-authored-by: Felix Fontein <felix@fontein.de>
5 years ago
Ilias Trichopoulos d6f2b4e788
Fix indentation (#66991) 5 years ago
Sander 87a5e433ef
update guide_azure.rst (#66940)
changed example for ping linux machines. Looks liked it was wrongly copy paste.
5 years ago
Simon Dodsley b1a8bded3f
Remove deprecated parameter for 2.10 in purefb_fs (#67026) 5 years ago
Mark Chappell 919a9e33e8
Minor AWS argument checks (required_if / mutually_exclusive) fixups (#66966)
* aws_netapp_cvs_snapshots - minor required_if fixup (state must be set if state=present)

* ec2 - fix typo in mutually_exclusive definition

* rds_instance: fix typo in mutually_exclusive restore_to_time should be restore_time - currently throws a boto error
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
Sam Doran c8568a5c94
Add documentation about vars used in roles at the play level (#66907) 5 years ago
Toshio Kuratomi 4273e84962
Upstream jinja has decided not to rename from jinja2. (#66880)
So we're going to keep our intersphinx labels as jinja2 to match what
upstream is doing
5 years ago
Abhijeet Kasurde 2728c2476e
docs: Fixed "Edit on GitHub" link for plugin, cli (#66745)
Fixed sphinx theme to navigate "Edit on Github" link to locate correct
plugin, cli source in GitHub repo.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein 5fdc9a61f0
docker_container: pass volumes only for anonymous volumes (#66600)
* Simplify code.

* Only pass anonymous volumes.

* Add changelog and update porting guide.

* Add integration tests.
5 years ago
Dusan Matejka 57805b7def
zabbix_proxy interface option documentation and argspec fixes (#66837)
* zabbix_proxy interface option documentation and argspec fixes

* Update changelogs/fragments/66837-zabbix-proxy-interface.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
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
Eitan Adler 86663abf37 all: fix all the the duplicate words (#66784) 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
Martin Krizek 4ca0c7f116 Fix case sensitivity for lookup() (#66521)
This brings consistency to lookup(), with_ and ansible-doc.

Fixes #66464

* Add a porting guide entry
5 years ago
Sandra McCann 68ab8c23be Network prompts (#66584)
* add network prompt examples and module examples

* Update docs/docsite/rst/network/user_guide/network_working_with_command_output.rst

Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
5 years ago
Toshio Kuratomi 14cc63dc0f Switch intersphinx label from jinja2 to jinja (#66703)
* Switch intersphinx label from jinja2 to jinja

Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
5 years ago
Jill R ac881b0026 Add section to aws devel guidelines about module_defaults (#66699) 5 years ago