Commit graph

51484 commits

Author SHA1 Message Date
Matt Martz
97765f4ebd
Role duplicates docs updates ()
* Change example to use role params to represent the documented outcome. Fixes 

* Add notes about how vars vs role params affect variable scoping, and how lazy evaluation and role-deduplicating is affected. Fixes 

* link to term
2020-12-18 11:55:54 -05:00
Felix Fontein
b514200126
Add link to all module and plugin indexes ()
* Add link to all module and plugin indexes.

* Use glob setting for toctree.

* Explicitly include new file.

* Move all_plugins one level up.

* Revert "Move all_plugins one level up."

This reverts commit bd47e82ead.

* Revert "Explicitly include new file."

This reverts commit 74ae50a734.

* Adjust .gitignore

* Revert "Revert "Explicitly include new file.""

This reverts commit f30d99c861.

* Fix docs make clean

Now that there's a static file in rst/collections, we have to be more
explicit about how we clean the generated files out of that directory.

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2020-12-18 11:55:31 -05:00
Sam Doooran
8fdb5ace01
Update WSL docs to mention sleep workaround ()
Co-authored-by: Joseph Chambers <joe.chambers@lexisnexis.com>
2020-12-18 11:49:56 -05:00
Andrew Klychkov
c1dadfdadc
Documentation: fix modules doc formatting () 2020-12-18 11:45:07 -05:00
tkhkokd
389c7b7806
Documentation fix, /etc/apt/source.list from non-code block to code block ()
/etc/apt/source.list
was sentence, not code-block. Therefore made it code-block
2020-12-18 11:41:38 -05:00
Sam Doooran
5ecfb19cad
arg_spec - move validator lookup method to a function ()
* arg_spec - move type checking lookup method to a function

* Change get_wanted_type name and behavior

Change the name to get_validator to bette describe what it is doing.

Change the interface to always return a value. This lines up with the behavior of get_*
functions always returning something or None and check_* functions raising an
Exception if something went wrong during the check.

* Add param to check_type_str()

Not meant to be a long term fix, but gets tests passing. More work is needed to figure
out how to solve this cleanly.

* Remove private attribute mapping types to validator

Since the function that needs it has moved to parameters.py, there is no need to have it as
a attribute of AnsibleModule.

Update tests that were referencing the private attribute.

* Use private method for 'str' type

To avoid having to put the string conversion warning behavior in the check_type_str() method,
use the private _check_type_str() method for 'str' type.

Import CHECK_ARGUMENT_TYPES_DISPATCHER for backwards compalitibility and store it as
a private attribute.

Revert changes to support plugins that are referencing serf._CHECK_ARGUMENT_TYPES_DISPATCHER.

* Add changelog

* Change function name to better reflect its... function

* Change dict name to better reflect its contents

CHECK_ARGUMENT_TYPES_DISPATCHER --> DEFAULT_TYPE_VALIDATORS

* Fix changelog
2020-12-17 17:15:00 -05:00
Sam Doooran
48803604cd
systemd - do not overwrite unit name when searching ()
* systemd - do not overwrite unit name when searching

PR  introduced a bug that changed the unit name when splitting it up for the purpose
of searching for the unit. This only happens on unit file templates on systems that have a 5.8
or newer kernel and a version of systemd that does not contain a bugfix that causes systmed
to fail to parse dbus.

* Use facts rather than a manual probe to determine if systmed is present

* Remov unnecessary block

* Use vars files instead of set_fact

* Add tests for using a templated unit file

* Update changelog fragment

* Use template to get correct path to sleep binary
2020-12-17 15:29:22 -05:00
Matt Martz
13bf04e95a
Clarify include_role documentation to indicate play vs playbook ()
* Clarify include_role documentation to indicate play vs playbook. Fixes 

* Additional clarifications
2020-12-17 14:28:16 -05:00
Sam Doooran
8e022ef00a
import_playbook - change additional params to deprecation ()
* import_playbook - change additional params to deprecation

I incorrectly recommended this be set as a warning when it should have been a deprecation.

* Fix deprecation sanity test to not required a collection name when not inside a collection
2020-12-17 14:14:58 -05:00
Felix Fontein
dbc2c996ab Allow key None to prevent errors with import test. 2020-12-17 09:04:06 -08:00
Sam Doooran
850a77f639
ansible-test - prefer venv over virtualenv on Python 3 ()
Also pin virtualenv to 16.7.10 for older Mac OS X systems. This was the version being installed
anway with the previous constraint (<20).

On systems with Python 3, now prefer venv over virtualenv. Test to see if venv is functional since
some systems have a non-functional venv installation (such as Debian).
2020-12-17 10:51:42 -05:00
Sloane Hertel
5e03e322de
Pass the top level dictionaries to combine_vars ()
* Pass the top level dictionaries to combine_vars

combine_vars uses dict.update() to replace keys
2020-12-16 11:23:23 -05:00
azrdev
6487a239c0
developing_inventory sample code: fix undefined var "results" if get_option(cache)=False ()
if user_cache_setting == False, then the previous code didn't parse the inventory source
2020-12-16 10:51:58 -05:00
Matt Clay
3274e02fd8
Update Azure Pipelines scripts and config. ()
* Increase fetch depth to reduce the frequency of full test runs for out-of-date PRs.
* Update scripts to match those which will be used in collections.
2020-12-15 15:28:44 -08:00
Matt Clay
37d09f2488
Update ansible-test pylint Python support. ()
* Update ansible-test pylint Python support.

* Python 3.8 is now officially supported.
* Python 3.9 is now skipped with a warning.
2020-12-15 10:27:32 -08:00
Jamie Wark
7eee2454f6
Remove note on combining roles and collections () 2020-12-15 09:18:14 -06:00
flowerysong
8450858651
Remove inaccurate Vault documentation ()
This is not functionality that exists.
2020-12-15 09:06:10 -06:00
Felix Fontein
0ba96d2be8
Compare removal and deprecation dates and versions in runtime metadata against current version and today ()
* Check deprecation and removal versions w.r.t. current version.

* Check removal dates from tombstones w.r.t. today.

* Add changelog.
2020-12-15 09:05:38 -05:00
Sloane Hertel
b0c78208fd
Add test for ansible-galaxy collection install
Test installing a collection to a directory containing other collections without any metadata ()
2020-12-15 08:59:28 -05:00
Brian Coca
d22804c4fb
saner path dir management ()
* saner path dir management

   fixes 

   ensure we always store paths w/o a_c

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2020-12-14 19:30:13 -05:00
Sam Doran
5157a92139 Remove exit code from traps in tests
Having the trap exit with a specific code will override
the exit code that caused the trap to run, which could
mask errors
2020-12-14 09:16:34 -08:00
David Shrewsbury
3a18ef7159
Change role argspec file used by ansible-doc ()
* Change role argspec file used by ansible-doc

This changes the file used for role argument specs from meta/argument_specs.yml
to meta/main.yml. The argument specs are expected to be in that file under the
top-level entry of `argument_spec`.

* Switch to argument_specs
2020-12-14 12:05:40 -05:00
Martin Zimmermann
83fb24b923
iptables: Adding multiport module support () 2020-12-14 10:23:54 -05:00
Adam Miller
0044091a05
Update yum/dnf module docs to include version comp ()
* Update yum/dnf module docs to include version comp

Fixes 

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix up docs syntax to sanity tests are happy

Signed-off-by: Adam Miller <admiller@redhat.com>
2020-12-11 10:31:19 -05:00
Toshio Kuratomi
e7dee73774
Collection list site packages ()
* ansible-galaxy collection list and verify now utilize collections in site-packages.

This is a short term fix for .  The long term fix needs to handle
install (but that discussion is also bound up in how upgrade is going to
work and where things can get installed so it's deferred for 2.11.)

* Add test for ansible-galaxy collection list with site-packages

* Fix sanity issue

Co-authored-by: David Moreau Simard <moi@dmsimard.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2020-12-11 09:59:33 +10:00
Sloane Hertel
0a60e5e341
Add a couple more tests to ansible-galaxy-collection ()
* Test installing a dependency compatible with multiple collection requirements

Test downloading a collection without dependencies

* Move cleanup to the end of the test suite
2020-12-10 11:26:50 -05:00
Matt Martz
a3b6485073
Fix reset_connection paramiko, winrm, psrp ()
* Ensure we only reset the connection when one has been previously established. Fixes 

* Ensure psrp doesn't trace

* winrm too

* Indentation fix
2020-12-09 12:57:56 -06:00
Matt Clay
36ab3d1189
Fix cryptography constraints in ansible-test. () 2020-12-09 10:46:05 -08:00
Matt Martz
83764ad506
Fix async interpreter parsing ()
* Fix async interpreter parsing. Fixes 

* Target localhost instead of remote host

* Don't forget inventory

* Address shellcheck issue
2020-12-09 11:41:45 -06:00
Martin Krizek
1b70260d5a
Add implicit role_complete block instead of role._eor ()
Co-authored-by: Matt Martz <matt@sivel.net>

Fixes 
2020-12-09 09:53:01 +01:00
Martin Krizek
252685092c
Use _wrap_native_text only for builtin STRING_TYPE_FILTERS () 2020-12-09 09:48:32 +01:00
Sven Wegener
08cc6edc64
vault: Read stdin data as binary on python3 ()
On python3 sys.stdin is an encoded file object that does not support
reading raw binary data. Use the supplied buffer object to do so.

Signed-off-by: Sven Wegener <sven.wegener@inovex.de>

Co-authored-by: Sven Wegener <sven.wegener@inovex.de>
2020-12-09 09:46:32 +01:00
Alicia Cozine
e5ccd18be4
Wording changes to docs () 2020-12-08 16:46:34 -05:00
Sandra McCann
6098793315
add docs survey banner ()
* add docs survey banner, with date
2020-12-08 15:09:35 -06:00
Matt Martz
6bc1e9f5dd
Address additional ansible_core rename issues ()
* Update __requires__ to reference the correct ansible_core package name

* ansible-test updates to handle the correct egg_info for ansible_core
2020-12-08 12:22:55 -06:00
Evgeni Golov
57c2cc7c77
correct the reST rendering of the R() note () 2020-12-08 16:46:09 +01:00
log-e
8f77e95765
Add alinux hostname module support () 2020-12-08 16:42:42 +01:00
lukebtaylor
bc35fbf5de
Change apt-add-repository to add-apt-repository () 2020-12-08 16:40:51 +01:00
Mathieu Rollet
4e74270322
Replace "hash of the path" by "hash of the file" () 2020-12-08 16:32:48 +01:00
David Shrewsbury
fe17cb6eba
Fix fileglob parameter order bug () 2020-12-08 16:31:34 +01:00
devon-mar
e97f333532
Add missing endfor to vlan_parser example () 2020-12-08 16:25:56 +01:00
Sam Doran
bc37976df2
Clarify mode behavior for modules that can set file permissions () 2020-12-08 16:11:36 +01:00
Matt Clay
711064a073 Remove shippable.yml 2020-12-07 10:13:09 -08:00
David Shrewsbury
be2c376ab8
Extract embedded function to RoleMixin method and add tests ()
* Add changelog
* Simplify return
2020-12-07 13:07:23 -05:00
Sijis Aviles
034e9b0252
unarchive - add include option ()
This should allow users to extract specific files from an archive as
desired.

Fixes , .

* Rebase and make a few minor changes
* Add changelog
* Improve tests

- move to separate tasks file
- change assertions to check for exactly one file
- use remote_tmp_dir for output dir

* Make exclude and include mutually exclusive
* Don't remove files needed by other tasks
* Fix sanity tests
* Improve feature documentation
* Skip tests that use map() on CentOS 6
* Use fnmatch on include for zip archives
  This matches the behavior of exclude

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-12-07 12:49:41 -05:00
Toshio Kuratomi
6608f3aab3
Update ansible roadmap ()
* Update to the ansible package roadmap for 3.0.0

* Rename files for the ansible roadmap from 2.11 to 3.0

Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-12-04 19:50:01 -08:00
Felix Fontein
f569d80fde
Improve deprecations ()
* Remove space before comma in '... bla , use ...'

* 'why' is inserted in the middle of a sentence, between two commas.

* Make deprecations from base.yml show source ansible-core.

* Add changelog fragment.

* Improve some more 'why's.

* Add PR URL to fragment.
2020-12-04 14:50:32 -05:00
Pilou
b464d18fd1
AnsibleModule.set_mode_if_different: handle symlink is in a sticky directory ()
* file: add symlink is in a sticky directory tests
* file: handle symlink in a sticky directory

Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Add changelog and fix unit test
The builtins import was removed since it was unused, but it is now needed.
2020-12-04 14:21:51 -05:00
Felix Fontein
5226ac5778
The implicit default for type=bool options is not 'false', but 'none' ()
* The implicit default for type=bool options is not 'false', but 'none'.

* Fix modules, resp. add ignore.txt entries.
2020-12-04 12:13:14 -05:00
Felix Fontein
f94ba68d8f
ansible-test sanity: fix UnicodeDecodeError for --python 2.7 --docker ()
* Store target paths as unicode.

* Add changelog fragment.
2020-12-04 12:12:14 -05:00