Commit graph

50958 commits

Author SHA1 Message Date
Ankit Sagar
865113aa29
Update user module documentation (#72109)
Co-authored-by: ankitsagar <ankitsagar15@gmail.com>
2020-10-06 15:31:37 -04:00
Matt Martz
50c8c87fe2
Add explicit coverage of suboptions=list without elements (#72108)
* Add explicit coverage of suboptions=list without elements

* ci_complete ci_coverage

* Remove incidental_vmware_guest_custom_attributes

* ci_complete ci_coverage
2020-10-06 13:15:02 -05:00
Felix Fontein
aff78f4cbc
Fix various sanity errors in plugins (#71736)
* Fix various sanity errors in plugins.

* Revert callback_type -> type transform.

* Undo paramiko_ssh 'connection' change, since this discrepancy is hardcoded in the plugin loader.

* Standardize on name and type (for callbacks).

* Fix existing author entries.

* Add 'Unknown (!UNKNOWN)' as author when author is missing.

* These are actually parsed as integers in the code.

* Revert "Add 'Unknown (!UNKNOWN)' as author when author is missing."

This reverts commit 29d1438aca.
2020-10-06 12:37:16 -04:00
Sloane Hertel
960e4c0809
Add intentional coverage for incidental_ec2_instance (#72028)
* Add a test suite for module_utils.common.dict_transformations

* ci_complete

ci_coverage

Add a wait_for test using delegate_to

* Remove incidental_ec2_instance

* Remove unused test support modules

* Requested changes

ci_complete

ci_coverage

* Oops, put everything back to test coverage again

ci_complete

ci_coverage

* Remove incidental_ec2_instance tests and supporting modules
2020-10-06 11:10:03 -05:00
Abhijeet Kasurde
9ffa84cc1c
basic: Handle exception in default selector (#72101)
In Python 2.7, default selector raises IOError
instead of OSError. Fix handles this exception.

Fixes: #71704

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-10-06 11:25:51 -04:00
Rick Elrod
ebc91a9b93
[unarchive] work on older RHEL with group: <gid> (#72098)
Change:
- No longer fail due to old Fedora/RHEL and our failure to try to cast
  gids to integers before trying to pass them to getgrgid() before
  trying to use them.
- Add tests for user/mode for various unarchive formats.

Test Plan:
- New integration tests, ran against centos6 container

Tickets:
- Fixes #71903
2020-10-06 11:25:03 -04:00
Rick Elrod
a90e37d017
[virt facts] identify KubeVirt properly (#72092)
Change:
- Make KubeVirt be identified as such, and with a guest role.
- This is a breaking change, since playbooks could be relying on the
  incorrect behavior previously.

Test Plan:
- Issue author

Tickets:
- Fixes #72001

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-10-06 11:22:22 -04:00
Rick Elrod
0332046699
[ansible-test] attempt to work around podman (#72096)
Change:
- podman > 2 && < 2.2 does not support "images --format {{json .}}"
- podman also now outputs images JSON differently than docker
- Work around both of the above.

Test Plan:
- Tested with podman 2.0.6 in Fedora 31.

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2020-10-05 20:13:52 -05:00
Matt Martz
460ba041c8
Add explicit coverage of required_together (#72107)
* Add explicit coverage of required_together

* ci_complete ci_coverage

* Remove incidental_hcloud_server

* Remove hcloud from shippable matrix

* ci_complete ci_coverage
2020-10-05 16:02:11 -05:00
Matt Martz
7f1c32f5ce
Rewrite _is_role and remove incidental_flatpak_remote (#72105)
* Build explicit list instead of complicated nested loop

* ci_complete ci_coverage

* Remove incidental_flatpak_remote

* ci_complete ci_coverage
2020-10-05 13:52:39 -05:00
Evan Van Dam
3db08adbb1
Add optional attribute arg for min and max filters (#50909)
* Pass **kwargs to min and max filters

* Use the jinja2 filters if available

* Add unit tests

* Add examples to docs passing attribute
2020-10-05 10:40:37 -04:00
Rick Elrod
709484969c
sysctl/openbsd fact fixes (#72070)
Change:
- Use `sysctl -n` for openbsd uptime information
- Allow `get_sysctl()` to account for multi-line sysctl settings
- Add unit tests for `get_sysctl()`

Test Plan:
- New unit tests

Tickets:
- Fixes #71968
- Refs #72025
- Refs #72067

Signed-off-by: Rick Elrod <rick@elrod.me>
Co-authored-by: Brian Coca <brian.coca+git@gmail.com>
Co-authored-by: Brian Coca <bcoca@ansible.com>
2020-10-02 18:36:31 -05:00
Matt Martz
35809806d3
Remove incidental_timezone (#72063)
* Add explicit coverage for templated undefined with_items element

* ci_complete ci_coverage

* Remove incidental_timezone

* ci_complete ci_coverage
2020-10-02 16:56:31 -05:00
Matt Martz
ab2b339dd6
More explicit argspec tests (#72064)
* Add more explicit coverage of argspec functionality

* fail_on_missing_params

* ci_complete ci_coverage

* Remove incidental_aws_step_functions_state_machine

* ci_complete ci_coverage

* Remove incidental_cs_service_offering

* ci_complete ci_coverage
2020-10-02 14:53:09 -05:00
Ruediger Pluem
a7170da851
user - allow local users with an expiry date to be created (#72022)
The luseradd / lusermod commands do not support the -e option. Set
the expiry time in this case via lchage after the user was
created / modified.

Fixes: #71942

In Python3 math.floor returns an integer whereas Python2 returns a float.
Hence always convert the result of math.floor to an int to ensure that
lexpires is an integer.

Move local expires tests in a separate file and import the tasks to the
main.yml to keep main.yml smaller.
2020-10-02 15:38:27 -04:00
Lars Kellogg-Stedman
bc98ebf29f
installation docs - add tip pointing to pip docs (#71741) 2020-10-02 15:34:44 -04:00
Sloane Hertel
cceba07114
VariableManager - add the 'vars' key before getting delegated variables (#71214)
* VariableManager - add the 'vars' key before getting delegated variables
2020-10-02 15:13:56 -04:00
Matt Martz
fb03ac7019
Add libyaml info to version output, and restore git info (#71948)
* Add libyaml info to version, restore git functionality

* Add clog fragment

* Update tests to reflect new version output
2020-10-02 14:04:49 -05:00
Sandra McCann
d051e66b13
git - clarify behavior of dest parameter (#71950) 2020-10-02 14:41:33 -04:00
Matt Martz
0e480d38dd
uri status_code elements are type int (#72062) 2020-10-02 13:36:14 -05:00
Erik Zettel
2b79cd2c0f
Fix typos (#72072) 2020-10-02 10:32:03 -04:00
Felix Fontein
1107aace1b
Add deprecation collection name to plugin options (#71735)
* Add changelog fragment.

* Use correct field that's expected by lib/ansible/cli/__init__.py..

* Add basic unit tests.
2020-10-02 09:43:23 -04:00
Andrew Klychkov
3efc8b6de8
Docsite: update user_guide/playbooks_prompts (#72049) 2020-10-01 16:34:23 -04:00
Andrew Klychkov
c12fce3aa9
Docsite: update user_guide/playbooks_checkmode (#72052) 2020-10-01 16:33:24 -04:00
Andrew Klychkov
77840f886e
Docsite: update user_guide/playbooks_debugger (#72053) 2020-10-01 16:32:03 -04:00
Amin Vakil
e68a638e7c
WIP: OpenBSD: add uptime to gather_facts (#72025)
* OpenBSD: add uptime to gather_facts
2020-10-01 15:34:40 -04:00
Zois Pagoulatos
eee13962e5
Minor typo in test_strategies.rst (#72060) 2020-10-01 14:34:23 -04:00
DarrenHSKG
88a676246e
Update porting_guide_2.8.rst (#72041)
##### SUMMARY
Removed translatable words from codeblocks as per https://github.com/ansible/ansible/issues/59449

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2020-10-01 11:53:02 +01:00
Serge van Ginderachter
4187846fe7
Update my github username (#72050) 2020-10-01 11:48:59 +01:00
Jordan Borean
672df07a33
Bump httptester version (#72036) 2020-10-01 08:18:21 +10:00
Jordan Borean
09c2475368
Update the tests to work with new httptester container (#72013) 2020-10-01 06:38:44 +10:00
Matt Martz
9081b22868
Remove incidental_vyos_static_route (#72024)
* Add explicit tests for required_together suboptions

* ci_complete ci_coverage

* Remove incidental_vyos_static_route

* ci_complete ci_coverage

* Add explicit coverage of suboptions required_if

* ci_complete ci_coverage

* Remove incidental_vyos_logging

* ci_complete ci_coverage
2020-09-30 15:38:12 -05:00
Abhijit Menon-Sen
64d9ccb965
Reword strangely patronising introduction to loops (#72019) 2020-09-30 16:05:46 -04:00
Bernhard Dick
f1c4a954d5
Close file descriptor of temporary file after building certificate chain (#71825)
* Close file descriptor of temporary file after building certificate chain.

* Add changelog fragment for PR71825
2020-09-30 20:43:24 +02:00
Baptiste Mille-Mathias
3af7425367
Clarify how package module works (#70345)
Module package is actually a proxy to a native package manager
modules (internally it delegates to the module that matches the
results of ansible_pkg_mgr).

Fixes #69371
2020-09-30 12:57:39 -04:00
Christian Loos
ea119d3089
fix distribution fact for SLES4SAP (#71559)
b6b238a fixed the SLES4SAP detection, which was at this time ok.
Sadly Suse changed with SLES 15 the /etc/os-release file, so the above
change will no longer work.

This commit updates the SLES4SAP detection regarding
https://www.suse.com/support/kb/doc/?id=000019341.

The symlink realpath is matched with endswith, because in SLES 12+ the
link target is SLES_SAP.prod, but in SLES 11 the link target is
SUSE_SLES_SAP.prod.
2020-09-30 10:52:41 -04:00
Matt Martz
6f4aed5377
Remove incidental_nios_txt_record (#72009)
* Add explicit coverage of argspec type=dict

* Non string mapping failure

* ci_complete ci_coverage

* Remove incidental_nios_txt_record and associated files

* Don't forget the ignore.txt changes

* ci_complete ci_coverage
2020-09-30 08:56:27 -05:00
Martin Krizek
4197666179
Only apply the unroll wrapper once (#72003)
Co-authored-by: Matt Martz <matt@sivel.net>

Fixes #71920
2020-09-30 09:15:28 +02:00
Felix Fontein
8893a244b9
Validate plugin option type 'dict' / 'dictionary' (#71928)
* Validate option type 'dict' / 'dictionary'.

* Add changelog fragment.

* Change type of 'environment' to list.
2020-09-29 17:16:14 -04:00
Felix Fontein
a077bca5d5
ansible-test: improve version number validation, validate some semantic versioning properties (#71679)
* Validate removal versions.
* Validate that removal collection versions and version_added collection versions conform to semver spec.
* Validate removal version numbers in meta/runtime.yml.
* Stricter validation for isodates (f.ex. YYYY-M-D is not allowed).
* Improve error reporting.
* Validate removal collection versions.

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-09-29 13:33:45 -07:00
Jordan Borean
3c33618cf6
powershell - remove env var (#72010) 2020-09-30 06:24:31 +10:00
Amin Vakil
8f02819db0
Replace deprectated include with {import,include}_tasks in apt{,_repository,_key} integration tests (#71964)
* Replace deprectated include with import_tasks

* Fix
2020-09-29 11:35:59 -04:00
flowerysong
91a153434a
Fix sorting of ignore.txt (#71930)
Mostly out of order from directory flattening
2020-09-29 11:10:23 -04:00
Matt Martz
f2512f7931
Remove incidental_xml integration tests (#71917)
* Add explicit integration tests to cover incidental_xml coverage

* normalize diff

* More normalization

* diff without changed

* ci_complete ci_coverage

* nuke incidental_xml

* ci_complete ci_coverage
2020-09-29 08:39:44 -05:00
Carlos Matos
cbd3df369f
Adding check to ensure 'container' get's added to guest_tech when appropriate (#71385) 2020-09-28 14:21:44 -05:00
Jorge Vallecillo
94522b7c10
Fix typos (#71970) 2020-09-28 14:33:24 -04:00
Andrew Klychkov
74be7de361
Docsite: improve user_guide/playbooks_vars_facts (#71973)
* Docsite: improve user_guide/playbooks_vars_facts
2020-09-28 14:32:01 -04:00
Andrew Klychkov
8ae3998ecf
Docsite: update user_guide/vault (#71975) 2020-09-28 14:29:34 -04:00
Andrew Klychkov
0645436acd
Docsite: update user_guide/playbooks_filters (#71980) 2020-09-28 14:26:57 -04:00
Felix Fontein
0c3a9c7ae6
ansible-doc: show correct plugin name (#71966) 2020-09-28 10:40:33 -05:00