Commit graph

51130 commits

Author SHA1 Message Date
Matt Martz
ccc63abc8e
Remove incidental vmware tests (#72420)
* Add explicit tests for ansible.module_utils.common.network.is_mac

* Test missing ANSIBLE_CONFIG

* Add explicit inventory script tests

* Add explicit tests for _consume_options

* Adjust perms, remove extra file

* ci_complete ci_coverage

* remove incidental_inventory_vmware_vm_inventory

* ci_complete ci_coverage

* Remove incidental_script_inventory_vmware_inventory

* ci_complete ci_coverage

* Remove incidental_vmware_guest

* ci_complete ci_coverage

* Remove incidental_vmware_host_hyperthreading and incidental_vmware_prepare_tests

* ci_complete ci_coverage

* newline and comment about what the test is doing

* ci_complete ci_coverage
2020-11-02 17:00:17 -06:00
Felix Fontein
64a809d2b6
Improve ansible-test classifications for collections (#72353) 2020-11-02 10:44:51 -08:00
Matt Martz
6543c7bc5d
Remove incidental_cs_role_permission (#72380)
* Add explicit argspec tests for choices

* ci_complete ci_coverage

* Remove incidental_cs_role_permission

* ci_complete ci_coverage

* ci_complete ci_coverage
2020-11-02 10:35:13 -06:00
Matt Martz
2ee5af514b
Update pip tests to omit install dev extras to avoid dep issues (#72436) 2020-11-02 10:06:09 -06:00
Kohei Takahashi
2e4038f4d2
Fixed a typo in user_guide/playbooks_conditinals (#72427)
+label: docsite_pr
2020-11-02 10:04:57 -05:00
Jordan Borean
809d5fc398
ansible-test - skip installing PowerShell sanity test reqs if they are already installed (#72423) 2020-10-30 21:52:27 -04:00
Brian Coca
4b673484f0
rethink wording (#70028)
* rethink wording
* removed unrequired requirement
* fix tests
* fixed versions
Co-authored-by: Sloane Hertel <shertel@redhat.com>
2020-10-30 17:13:12 -04:00
Felix Fontein
4fb336cef1
ansible-doc: export has_action when --json is used (#72359)
* ansible-doc: export has_action when --json is used.
* Remove docuri and now_data, which were not used resp. ignored in format_plugin_doc and the functions it calls anyway.
* Add function _combine_plugin_doc.
2020-10-30 10:51:54 -04:00
Richlv
111589d999
Minor typo/style fixes (#72374) 2020-10-30 10:34:02 -04:00
Brian Coca
cb94c0cc55
added timeout options to adhoc and console (#71230)
* added timeout options to adhoc and console

* added test

* fix typosesz

* fix conflict

* task_timeout

* fix timeout option, added extra vars to console

* actually use right cli switch .. DUH!

* added timeout to include 'valid' but ignored keys

* fix default

* fixes per review
2020-10-30 10:09:30 -04:00
Brian Coca
96c1972439
find will give more specific reasons on skip (#68823)
* find will give more specific reasons on skip

 - added more error handling
 - use random path for test
2020-10-30 10:08:19 -04:00
Sam Doran
fb09fd2a23
wait_for - ignore psutil related errors (#72401)
When enumerating connections with psutil, catch and ignore errors to avoid returning a stack trace.

Co-authored-by:  Matt Martz <matt@sivel.net>
2020-10-29 21:40:31 -04:00
Matt Martz
e73a0b2460
Explicitly get the include task, and not assume it is the parent (#72378)
* Explicitly get the include task, and not assume it is the parent. Fixes #6571
2020-10-29 15:15:18 -04:00
Sam Doran
a51a6f4a25
reboot - add reboot_command parameter (#69847)
Fixes #51359
* Update default search paths
* Fix returns for args and command, don't allow conversion
* Reorganize tests
* Fix test for Azure Pipelines
2020-10-28 12:10:59 -04:00
Brian Coca
e05c62547b
run playbook from collections (#67435)
* fixes for collection playbooks

 - add fqcn invocation, also handles extensions
 - bring import_playbook into new normal
 - avoid adding collection playbooks to adjacency
 - deal with extensions or lack of em
 - added tests
 - fix bugs with multiple playbooks supplied
 - unicode/bytes/native fixes
 - fix modulenotfound for < py3.7
 - tests
2020-10-28 11:46:39 -04:00
Sam Doran
8f9cf456b0
url lookup - set default user agent (#72324)
* Add unit tests
* Add note about when default changed
2020-10-28 09:34:06 -04:00
Jordan Borean
4856ab0e68
Galaxy server update (#72286)
* Update galaxy server image used in CI

* Fix port and migration issue

* Add delete step, still need to deal with pagination

* Make cleanup more efficient

* Remove testing code
2020-10-28 09:17:40 +10:00
Sam Doran
d6115887fa
systemd - use list-unit-files rather than list-units (#72363)
list-unit-files will return all files on the system. list-units omits those
that are disabled.

Co-authored-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2020-10-27 17:43:36 -04:00
Sam Doran
7352457e7b
hostname - add macOS (#54439)
* Add DarwinStrategy class and integration tests

macOS has three seprate hostname params that need to be set. One of those params, LocalHostName, has more stringent requirements than the other two, which accept special characters and spaces. Create a method to scrub the hostname to ensure it works well with the system requirements.

* Update documentation

* Account for virtualization type returned on Azure Pipelines

* Do not be dependent on order of self.name_types

Use the scrubbed name when the name type is LocalHostName
2020-10-27 17:30:54 -04:00
Daniel Tavernier
dd19c9f737
Update playbooks_tags.rst (#72351)
##### SUMMARY
Corrected the "Adding tags to blocks" example syntax. 


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2020-10-27 15:50:49 -04:00
Sam Doran
c51438312a
blockinfile - properly insert block when no trailing new line exists (#72350) 2020-10-27 10:34:09 -05:00
Felix Fontein
233e7beb5b
Fix processing of add_file_common_args=True when argument_spec is not specified as kwarg. (#72334) 2020-10-27 10:25:18 -05:00
Sloane Hertel
dee8a4a8f1
Use type 'path' for fact_caching_connection in jsonfile cache plugin (#72317) 2020-10-27 10:10:13 -05:00
Matt Clay
b848fa0fc7 Update hostname test to skip containerd. 2020-10-26 14:05:38 -07:00
Sam Doran
db84e2c989
systemd - fix issue with capbpf and newer kernel (#72337)
A bug existed in systemd 245 that did not properly handle unknown kernel
capabilities gracefully. This resulted in incomplete output when querying
for the service status. It is possible to get service status by other means.
This PR works around this issue by getting service status using other commands
in the event of a failure due to this bug.
2020-10-26 13:53:31 -04:00
Rick Elrod
2293b327c0
[ansible-test] Limit cryptography to <3.2 (#72342)
Change:
- Cryptography 3.2 drops support for OpenSSL 1.0.2. Some of our CI
  infrastructure still uses this version (FreeBSD, namely). For now,
  just add a constraint to use old cryptography.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-10-26 11:39:37 -05:00
Sloane Hertel
8b07d46166
Add a toggle for the leading separator for keyed_groups (#60882)
* Add a toggle for the leading separator for keyed_groups if no prefix is given

* changelog

* Add tests for backward compatibility and the new toggle
2020-10-23 15:57:44 -04:00
Felix Fontein
0b2b82c0b6
Add changelog fragment for #71736. (#72323) 2020-10-23 14:34:31 -05:00
Matt Davis
83909bfa22
Remove ansible-galaxy login (#72288)
* GitHub is removing the underlying API used to implement the `login` command. Since the general consensus seems to be that relatively nobody currently uses this command (in favor of explicit token passing), support was simply removed for interactive login. If a future need arises, this command should be reimplemented via OAuth Device Auth Grants.
* login or role login commands now produce a fatal error with a descriptive message
* updated 2.10 and 2.11 porting guide entries

* remove dead code/config, update messages and porting guides
2020-10-23 09:11:45 -07:00
Abhijeet Kasurde
b6360dc5e0
VMware: scenario guide for vmware_tools connection plugin (#72080)
* VMware: scenario guide for vmware_tools connection plugin

Scenario doc to guide user about the usage of vmware_tools
using connection plugin.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-10-23 10:44:12 -04:00
Matt Clay
3c2e8b99be
Fix ansible-test handling of user-defined docker networks. (#72256)
* Fix ansible-test docker container detection.

* Attach test containers to the correct network.

* Do not assume `localhost` for accesing Docker.

* Look for containers on current network.

* Always map /var/run/docker.sock into containers.

This fixes issues when using a remote Docker host.

* Support container IP lookup from networks list.

* Fix container network attachment.

* Remove redundant container detection messages.

* Limit DOCKER_HOST parsing to TCP.

* Restore docker socket existence check.

The check is skipped if the docker hostname is not localhost.

* Correct changelog entry.
2020-10-22 18:45:03 -07:00
Felix Fontein
1489bf9190
Adds argspec tests for required, required_one_of and required_by (#72245)
* Improve variable names.

* Add test for required.

* Add test for required_one_of.

* Add test for required_by.
2020-10-22 14:05:59 -05:00
Abhijeet Kasurde
fe65144a4a
vmware: Using env variable for custom SSL path (#72273)
When validate_certs is True and user has custom SSL
certificate path, user can use ``REQUESTS_CA_PATH``
in ``environment`` parameter of task to specify this path.

Fixes: https://github.com/ansible-collections/community.vmware/issues/49

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-10-22 14:48:26 -04:00
Ruediger Pluem
e64ba97e8a
Fix the reversed order of return values (#72088)
* Fix the reversed order of return values

AnsibleModule.run_command returns a tuple of return code, stdout and stderr.
The module main function of the user module expects user.create_user to
return a tuple of return code, stdout and stderr.
Fix the locations where stdout and stderr got reversed.

* Fix another missed occurance

* Add changelog

* Fix further reversed order of return values occurrences

Followup to 72c3ba62c8:
Fix further reversed order of return values occurrences.
2020-10-22 20:02:53 +02:00
Nathan Scott
c20329a0f6
Update migrating_roles.rst (#72260)
Fix a typo in the sample spec file Source0 line
2020-10-20 13:19:45 -05:00
Sandra McCann
3ece57c01a
remove ansibleFest banner (#72253) 2020-10-20 13:18:16 -05:00
Rick Elrod
69e510e767
[virt facts] recognize containerd as a container (#72210)
Change:
- containerd is now recognized as container tech

Test Plan:
- Tested with Docker inside Github Actions in a private repo:

        "ansible_virtualization_role": "guest",
        "ansible_virtualization_tech_guest": [
            "containerd",
            "container",
            "VirtualPC"
        ],
        "ansible_virtualization_tech_host": [],
        "ansible_virtualization_type": "containerd",

Tickets:
- Fixes #66304 because this is what docker containers show up as
  in Github Actions.

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-10-20 10:39:13 -05:00
Jaime Hablutzel
afba5c2852
Miscellaneous fixes in user_guide/intro_inventory.rst docs (#72202)
* Fixing missing hosts entry under the group dict.

* Added missing 'vars:' key

* Reordering arguments for consistency with the format displayed by "ansible-playbook --help"

* Fixing contradictory text
2020-10-20 10:35:15 -05:00
Abhijeet Kasurde
02658d7bf8
k8s: Scenario guides (#72095)
* Start Kubernetes Scenario guides for users
* K8S inventory scenario guide

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-10-20 10:11:33 -04:00
Ronald Eddy Jr
d18901dd4a
Update HTTP -> HTTPS (#72244)
Co-authored-by: Ronald Eddy Jr <ron@Ronalds-MacBook-Pro.local>
2020-10-19 15:57:20 -04:00
Jordan Borean
c9fa1d0e7e
Fix race condition when creating async dir (#72069)
* Fix race condition when creating async dir

* Simplify exception wrapper

* Remove var used for testing
2020-10-19 15:05:19 -04:00
Toshio Kuratomi
618d1a3871
Document security concern for users setting the system_tmpdirs shell plugin config (#72213) 2020-10-19 14:58:09 -04:00
Matt Martz
be5fc4e642
Ensure we call action_loader.get with collection_list (#72206)
* Ensure we call action_loader.get with collection_list. Fixes #72170

* Add tests and changelog

* Remove grep, do assertion in playbook. ci_complete

* Skip old jinja2 versions

* ci_complete

* dedupe
2020-10-19 09:54:24 -05:00
Rick Elrod
9ddb1d76af
[tests/dnf] work around dnf packaging issue (#72249)
Change:
- In this test we end up upgrading dnf (and python3-dnf) so that we can
  test its new logging behavior. However, the latest Fedora 32 dnf had a
  packaging issue which caused it to not pull in the latest
  python3-libdnf. This is fixed, but not synced out to mirrors yet.
  Fixing it in this test will get CI passing again in the meanwhile.

Test Plan:
- CI

Tickets:
- https://bugzilla.redhat.com/show_bug.cgi?id=1887502

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-10-19 09:52:33 -05:00
Adam Leskis
39d6c5ef7a
fix simple typos (#72219) 2020-10-15 16:47:55 -05:00
Brian Coca
5ec53f9db8
make collection callbacks follow normal flow (#59932)
make collections whitelist follow normal flow

* fixes missing set_options call and adhoc and stdout processing rules
* avoid dupes
* fixed to handle redirects
* also updated tests with new and more accurate skip message
* fix callback tests for envs with cowsay installed
* lots MOAR comments on why the code is as it is, some todos to refactor in future

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-10-15 15:31:18 -04:00
Matt Martz
a33cc191bd
Update 2.11 Roadmap to include dates and planned work (#72222)
* Update 2.11 Roadmap to include dates and planned work

* remove comma
2020-10-15 13:52:51 -05:00
Matt Clay
2ef4b7e07e Fix ansible-test Azure Pipelines container auth. 2020-10-14 12:35:11 -07:00
Justin Otherguy
8465f285cc
Update playbooks_strategies.rst (#72176)
beside the fact that naming the variable to specify the number of machines executed in *parallel* is named *serial* - the number of hosts chosen in this example is not optimal, either: 2x2 = 4; so - 3 hosts in 2 batches should clear things up a little
2020-10-14 12:26:16 -05:00
Ken Celenza
b18e462bbb
Consistent Taxonomy (#72215)
Historically "these" have been called directives, attributes, and keywords. We've now settled on `keyword` (https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html). Update all documentation to reflect this term.
2020-10-14 12:16:30 -05:00