Commit graph

51186 commits

Author SHA1 Message Date
Alexei Znamensky
920b68f5f2
Fixed/improved regular expresssion for collection names (#73577)
* added changelog fragment
* added a couple of tests to coll name validation
2021-03-01 10:40:38 -05:00
Alexander Sowitzki
e804fccf1c Let file module not change link to absolute when src not given (#65448)
The file module changes existing sym links from relative to absolute
if the src is not stated in the tasks since it uses `os.path.realpath`
to fetch the link source and not `os.readlink`. Changed that.
2021-03-01 15:14:03 +01:00
Ikko Ashimine
176beddb3f
Fix typo in incidental.py (#73737)
successfull -> successful
2021-03-01 17:37:58 +05:30
Rick Elrod
17fabd8b45
[changelog config] Ansible Base -> ansible-core (#73739)
Signed-off-by: Rick Elrod <rick@elrod.me>
2021-02-27 21:51:11 -06:00
Sam Doran
2377a0a776
Improve ArgumentSpecValidator unit tests (#73642)
* Add more scenarios to basic valid testing
* Update invalid tests
* Fix test for Python 2
* Condense data
* Add tests for missing required and invalid-elements
* Update aliases tests
* Add invalid scenarios for aliases
* Add tests for _add_error() method
* Fix sanity test failure
2021-02-26 09:30:16 -05:00
Brian Coca
91b42d62fa
another useful example (#73728) 2021-02-25 16:11:16 -06:00
Brian Coca
9690512069
Pipe it to connections (#73688)
* pipelining tweaks
  added 'defaults'  entry for ini pipelining from ssh plugin
2021-02-25 15:08:11 -05:00
Sloane Hertel
8628c12f30
find module - stop traversing directories with os.walk when depth is already exceeded (#73718) 2021-02-26 05:32:49 +10:00
Matt Martz
950ab74758
Normalize ConfigParser between Python2 and Python3 (#73715)
* Normalize config parser between py2 and py3

* Add tests and changelog

* Use different config entry, since we supply certain env vars
2021-02-25 11:03:03 -06:00
manas-init
eb72c36a71
galaxy: Handle ignored directory names in role skeleton (#72035)
* galaxy: restore left hand slicing in assignment

Fix 'ansible-galaxy role init --role-skeleton=role-skeleton' when the role skeleton
contains an ignored directory.

The issue was because the 'dirs' variable was changed to reference a different list,
but needs to be mutated instead to stop os.walk from traversing ignored directories.

Fixes: #71977

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-02-24 18:52:24 -05:00
Brian Coca
dabfee4d5c
commented function (#73625) 2021-02-24 01:20:47 -05:00
Alicia Cozine
29d3951464
Docs: Adds banner for core/package split (#73552)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-02-23 15:54:17 -05:00
Sandra McCann
f4eab92aa0
fix core version switcher (#73704) 2021-02-23 14:12:54 -06:00
Matt Martz
11f1177e6c
Operate pexpect with bytes to limit encoding issues (#73255)
* Operate pexpect with bytes to limit encoding issues

* Update tests to ensure no pepxect encoding issues

* Add changelog fragment

* Add multiline note

* Use rst formatting directly
2021-02-23 18:57:25 +01:00
Abhijeet Kasurde
4b347415fa
inventory: misc typo fixes (#73695)
* Misc typo fixes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-02-23 10:42:20 -05:00
Sam Doran
3ab52f2965
Disable junit callback on roles_arg_spec_tests (#73663)
This prevents the role arg spec validation tasks from showing up as failure
in the CI output.
2021-02-23 10:21:28 -05:00
Sviatoslav Sydorenko
c22bc46cb9
Mention ansible-core @ "Release and maintenance" (#73612) 2021-02-22 19:07:25 -06:00
Viktor Ekholm
b28abdfbdb
Fixed typo in vault documentation (#73666)
Example variable was named `my_encrytped_var`. Renamed it to `my_encrypted_var`.
2021-02-22 19:03:23 -06:00
Rick Elrod
fa046d302c
[InventoryManager] Fix two unhandled exceptions (#73667)
Change:
- Fix regression: unhandled exception when given inventory directory
  is empty or contains empty subdirectories.
- Fix unhandled exception when limit file is actually a directory
  instead of a file.
- Fix inventory tests which previously could never fail due to missing
  `set -e`. Fixed up tests that failed after `set -e` was added. Added
  several tests.

Test Plan:
- New tests
- Fixed existing tests which previously could never fail

Tickets:
- Fixes #73658

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-02-22 16:18:23 -05:00
Syed Ali Haider
5078a0baa2
Minor Doc Update to password.py (#73468)
Adds in the caveat that Python's string modules have different constants depending on the major version (2.x vs 3.x), but preserves the fact that a fair amount of them are common. Other minor docs touchups also included.
2021-02-18 17:22:16 -06:00
David Shrewsbury
c8ee186e11
Remove warning about role validation with deps (#73653)
* Remove warning about role validation with deps

* add changelog

* update cl
2021-02-18 17:16:03 -06:00
Jens Heinrich
1a14996025
Replace reference to playbook_environment (#73633)
Use the new anchor syntax
2021-02-18 17:07:23 -06:00
Willams de Lima
fa05af8321
Fixing ad-hoc commands #73636 (#73646) 2021-02-18 16:48:22 -06:00
Felix Fontein
b6566d26df
pylint sanity test: stop ignoring 'used-before-assignment' (#73639)
* Remove pylint ignore 'used-before-assignment'.

* Adjust changelog fragment.
2021-02-18 12:36:28 -08:00
Toshio Kuratomi
89ed2353e0
Update the porting guide for a new ansible version (#73650)
* Update the porting guide for a new ansible version

* Add a link to the changelog to the ansible-3 porting guide
2021-02-18 12:38:56 -05:00
Andrew Klychkov
010afe0b2d azure-pipelines: remove ubuntu1604 2021-02-18 08:58:02 -08:00
Aaron Guise
ac0dedda72
hostname - add Almalinux support (#73619) 2021-02-18 10:24:36 -05:00
Sandra McCann
ccbfdec334
Split Ansible docs from core docs (#73616)
* excludes scenario guides from core docs, splits porting guides and roadmaps, symlinks indices to create index.html pages, and adds .gitignore entries for conf.py and the toplevel index.rst files generated by the docs build

This solution builds three types of docs:
* ansible-2.10 and earlier: all the docs.  Handle this via `make webdocs
  ANSIBLE_VERSION=2.10`
* ansible-3 and later: a subset of the docs for the ansible package.
  Handle this via `make webdocs ANSIBLE_VERSION=3` (change the
  ANSIBLE_VERSION to match the version being built for.
* ansible-core: a subset of the docs for the ansible-core package.
  Handle this via `make coredocs`.

* `make webdocs` now always builds all the collection docs
*  Use `make coredocs` to limit it to core plugins only
*  The user specifies the desired version. If no ANSIBLE_VERSION is specified, build plugins for the latest release of ansible
 
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2021-02-17 09:57:05 -06:00
Sebastian Haderecker
27baa8cd86
OpenStack guidelines: Replace with link (#73617)
Replace the guidelines page with a link to the current guidelines on opendev.org.
2021-02-17 09:09:08 -05:00
David Moreau Simard
d40da3ee0b
Update 2.10 porting guide to include module index (#73615)
This will help users find out where modules and plugins might have been moved.
2021-02-16 11:24:52 -06:00
Sloane Hertel
00bd0b893d
ansible-galaxy - set the cache file after getting all collection versions (#73557)
* Manage the in-memory cache in _call_galaxy but let the caller set the file cache after getting paginated results

* Add a test for caching successful and not caching unsuccessful paginated results

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-02-15 09:45:01 -05:00
Felix Fontein
29aef842d7
ansible-test: make sure tests are also run for the new plugin types (#73599)
* Make sure tests are also run for the new plugin types.
* New plugin types are not documentable.
2021-02-13 14:05:16 -08:00
Matt Clay
d092356fc5 Fix ansible-test handling of egg-info.
Resolves https://github.com/ansible/ansible/issues/67990
2021-02-13 01:05:00 -08:00
Matt Clay
133a29acb4 Add test to verify pkg_resources imports work. 2021-02-12 23:51:37 -08:00
Sam Doran
18f7282ccf
ansible-doc - account for empty meta/main.yml (#73590)
* ansible-doc - account for empty meta/main.yml

 from_yaml() will return None when encrounting an empty file.
2021-02-12 17:37:00 -05:00
David Shrewsbury
d1d9406066
Add rolespec_validate to import/include_role (#73589)
* Add rolespec_validate to import/include_role

* Add changelog

* fix sanity, not private
2021-02-12 16:26:33 -06:00
Felix Fontein
1f3a90270b
Import sanity test for plugins (#72497) 2021-02-12 14:09:50 -08:00
Lydie
4059b37ab1
Conscious language added to user guide, development guide, and Ansible community guide, (#73574)
* Added conscious language note to index pages of guides
2021-02-12 15:32:44 -06:00
Felix Fontein
ff0edca8cc Catch more potential errors when setting up curses. 2021-02-12 13:09:02 -08:00
David Shrewsbury
f0ec10dbc3
Role arg spec validation implementation (#73152)
* Initial import of modified version of alikins' code
* Add unit testing for new Role methods
* Fix validate_arg_spec module for sanity test. Add test_include_role_fails.yml integration test from orig PR.
* Add testing of suboptions
* Use new ArgumentSpecValidator class instead of AnsibleModule
* fix for roles with no tasks, use FQ name of new plugin
* Add role dep warning
2021-02-12 16:00:17 -05:00
Brian Coca
6d15e1aa6e
corrected description info (#73586)
* corrected description info
2021-02-12 13:17:44 -05:00
Brian Coca
ea2f37d253
allow constructed to use vars plugin (#73418)
Allow constructed to optionally use vars plugin data

* mostly for those looking to leverage group_vars/ and host_vars/
* limited to already processed sources
2021-02-12 11:14:50 -05:00
Matt Clay
30a4ef4414 Update ansible-test default test containers. 2021-02-11 19:43:02 -08:00
Gonéri Le Bouder
0a8d5c0983 ansible-test: yamllint, check the assigment
Ensure `yamllint`'s `check_assignment()` correctly ignore the
attribute assignment. Those don't have any `.id` attribute and will
trigger an `AttributeError` exception.

See: https://github.com/ansible/ansible/pull/73322
2021-02-11 19:42:27 -08:00
Sviatoslav Sydorenko
f327e65d11
Use iskeyword and str.isidentifier for "is FQCN" (#73279)
* Use valid FQCN in test_verbosity_arguments

* Use iskeyword and str.isidentifier for "is FQCN"
2021-02-11 18:23:57 -08:00
Matt Clay
f533d46572
Fix ansible-test constraints issues. (#73578)
* Silence Python 3.5 EOL notice in pip.
* Skip import test on compat/selinux.py utils.
* Improve Python version skip warning.
* Use Python 3.6 as minimum Python for sanity tests.
* Improve min Python handling for code-smell tests.
* Overhaul test-constraints sanity test.
* Merge sanity test constraints with requirements.
* Remove legacy content specific constraints.
* Add changelog fragment.
2021-02-11 16:45:53 -08:00
Sam Doran
b6811dfb61
Add argument spec validator (#73335)
Add argument spec validator class
2021-02-11 19:17:14 -05:00
Toshio Kuratomi
2b227203a2
Ansible 4 roadmap (#73465)
Co-authored-by: Deric Crago <deric.crago@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Deric Crago <deric.crago@gmail.com>
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-02-11 15:47:04 -05:00
Alexander Sowitzki
d0fda3e901
Let vault lookup output unicode string. (#73571)
Until now, the lookup plugin returned a byte string.
Changed this to output a unicode string instead.
2021-02-11 14:27:47 -05:00
Lazuardi N Putra
bcefb6b5f1
fix typo in ansible vault decrypt if vault error (#73542) 2021-02-11 14:14:50 -05:00