Commit graph

50475 commits

Author SHA1 Message Date
Felix Fontein
2ff5bf0f21
Fix processing of add_file_common_args=True when argument_spec is not specified as kwarg. (#72334) (#72361)
(cherry picked from commit 233e7beb5b)
2020-12-07 17:01:33 -06:00
Felix Fontein
42da480721
ansible-doc: export has_action when --json is used (#72359) (#72414)
* 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.

(cherry picked from commit 4fb336cef1)
2020-12-07 16:59:33 -06:00
Felix Fontein
27f547b4d3
[2.10] Fix missing ansible.builtin FQCNs in hardcoded action names (#72457)
* Fix missing ansible.builtin FQCNs in hardcoded action names (#71824)

* Make sure hard-coded action names also check for FQCN.
* Use _add_internal_fqcn() to avoid hardcoded lists and typoes.

(cherry picked from commit da60525610)

* Replace some more FQCNs.

(cherry picked from commit 72302dd611)
2020-12-07 16:59:12 -06:00
Felix Fontein
07cdb709ae
Adjust action groups to moved modules (#72428) (#72496)
* Support docker and k8s action groups for moved modules in community.docker and community.kubevirt.

* Also support k8s action group for community.okd.

* Also add kubernetes.core.

* Fix changelog fragment.

* Remove community.okd.

* Revert "Remove community.okd."

This reverts commit 812b5aa6e2.

(cherry picked from commit c7a4b39633)
2020-12-07 16:58:42 -06:00
Sam Doran
ba25a1cdf1
[stable-2.10] AnsibleModule.set_mode_if_different: handle symlink is in a sticky directory (#45198) (#72863)
* 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.
(cherry picked from commit b464d18fd1)

Co-authored-by: Pilou <pierre-louis.bonicoli@libregerbil.fr>
2020-12-07 16:52:40 -06:00
Felix Fontein
6dc2e9c2f4
[2.10] The implicit default for type=bool options is not 'false', but 'none' (#72864)
* The implicit default for type=bool options is not 'false', but 'none' (#72699)

* Fix modules, resp. add ignore.txt entries.

(cherry picked from commit 5226ac5778)

* Add ignore.txt entries and fix deprecated option that was already removed in 2.11.
2020-12-07 16:51:35 -06:00
Felix Fontein
a15550c0c8
ansible-test sanity: fix UnicodeDecodeError for --python 2.7 --docker (#72623) (#72865)
* Store target paths as unicode.

* Add changelog fragment.

(cherry picked from commit f94ba68d8f)
2020-12-07 16:48:19 -06:00
Felix Fontein
138a5bd2d6
[2.10] Improve deprecations (#72871)
* Improve deprecations (#72697)

* 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.

(cherry picked from commit f569d80fde)

* 2.10 is ansible-base, not ansible-core
2020-12-07 16:47:38 -06:00
Matt Clay
856a932ca0 [stable-2.10] Remove shippable.yml.
(cherry picked from commit 711064a073)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-12-07 14:44:44 -08:00
Felix Fontein
7e2faa25d7 Improve ansible-test classifications for collections (#72353)
(cherry picked from commit 64a809d2b6)
2020-12-03 17:27:29 -08:00
Matt Clay
dbdacbd48c [stable-2.10] Use AZP config for integration-aliases test.
No changelog entry since this test is limited to the ansible/ansible repo.

Backport of https://github.com/ansible/ansible/pull/72842
2020-12-03 16:17:21 -08:00
Matt Clay
7813b1248b [stable-2.10] Fix Azure Pipelines change detection. (#72824)
(cherry picked from commit 08842cd6bb)

Co-authored-by: Matt Clay <mclay@redhat.com>
2020-12-03 10:10:08 -08:00
Matt Clay
eb4f30cd03 [stable-2.10] Fix CI schedule. 2020-12-02 20:49:13 -08:00
Matt Davis
2d5f549a98
update PyPI badge to use ansible-base (#72814) 2020-12-02 18:26:58 -08:00
Matt Davis
a1288def89
update build badge for AZP (#72807) (#72810)
(cherry picked from commit d567a553a9)
2020-12-02 17:27:43 -08:00
Matt Clay
99d5afaad0 [stable-2.10] Azure Pipelines configuration. 2020-12-02 14:57:34 -08:00
Rick Elrod
0d7ab375eb
[centos6] update container for EOL (#72795)
Change:
- Reference:
  https://lists.centos.org/pipermail/centos-devel/2020-December/056208.html
- Bump centos6 container to 1.25.0

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-12-02 16:04:38 -06:00
Jordan Borean
7802ca2b06
Add RHEL 7.9 (#72558) - 2.10 (#72568)
* Add RHEL 7.9 - ci_complete (#72558)

(cherry picked from commit d451433e5d)

* Added changelog for RHEL 7.9 (#72572)

(cherry picked from commit bdd0c48837)
2020-12-01 12:51:15 -08:00
Sam Doran
6322630360 [stable-2.10] ansible-test - add cryptography constraint for cffi (#72761)
The recently released version of cffi fails to install on systems with an older version of gcc. In
our case, this in the CentOS 6 test image. There is a fix but it has not yet been released.

https://foss.heptapod.net/pypy/cffi/-/issues/480
(cherry picked from commit 1db9588279)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-12-01 09:49:17 -08:00
David Shrewsbury
3297c221f1
Test pip fix (#72764)
(cherry picked from commit 2eb9795543)
2020-12-01 10:36:48 -06:00
Baptiste Mille-Mathias
633396c71b
Update playbooks_filters_ipaddr.rst (#72705) (#72755)
Fix the order of the arguments for ansible.netcommon.reduce_on_network. Pass the network as the argument and the list of IP addresses as the filter input.

(cherry picked from commit 454ac6420e)

Co-authored-by: Pablo Martinez <pablo@docecosas.com>
2020-11-30 15:25:22 -06:00
Sloane Hertel
8bdda8792d
Remove incorrect changelog (#72682)
* also remove offending code
2020-11-30 10:02:26 -06:00
Sam Doran
581337a6d5
[stable-2.10] Fix super annoying Python 2.6 multiprocessing.Queue stack trace in CI (#72604) (#72608)
* Fix super annoying Python 2.6 multiprocessing.Queue stack trace in CI

A bug exists in Python 2.6 that sometimes raises an exception during interpreter shutdown. We
encounter this frequently in our CI since we run tests on CentOS 6 as the control node, which
has Python 2.6.6 with this bug.

This PR adds a very minor sleep only on Python 2.6 which gets around this issue. I did lot of testing
using a standalon script I found that easily duplicated the issue to find the minimum sleep value
needed to avoid this issue.

CPython issue: https://bugs.python.org/issue4106
Fix in CPython: https://hg.python.org/cpython/rev/d316315a8781

* Use correct attribute
(cherry picked from commit bbef250c2b)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2020-11-20 13:10:11 -06:00
Felix Fontein
ed78b479ec
Improve argument spec documentation (#72335) (#72486)
* Link to argument spec documentation from 'Creating a module'.

* Use items instead of sub-headings.

* Update deprecation information.

* Document conditional requirements.

* Document supports_check_mode and add_file_common_args.

* Add deprecation examples.

* Re-add word.

* Improve title.

* Fix RST formatting, add conditional dependency section starter.

(cherry picked from commit 01d207a3e3)
2020-11-13 15:17:31 -06:00
Andrew Klychkov
913aebb140
Docsite: update user_guide/playbooks_module_defaults (#72051) (#72493)
* Docsite: update user_guide/playbooks_module_defaults, add name: lines and use FQCN consistently
(cherry picked from commit dbe43e071e)
2020-11-13 14:51:37 -06:00
Felix Fontein
fc4411adcd
Improve config.rst formatting (#72354) (#72487)
* Indent Jinja2 directives.

* Show version_added and deprecations for ini settings and environment variables.

* Make default conditional, add choices. Copied from #55474.

* Add Ansible variables. Copied from #55474.

* Turn ini keys and environment variables into lists. Copied from #55474.

* Improve formatting. Copied from #55474.

(cherry picked from commit 569d937df8)
2020-11-13 14:31:32 -06:00
Matt Clay
cfa8075537 [stable-2.10] Add coverage exporting to ansible-test
A new `--export` option for `ansible-test coverage combine` allows multi-step aggregation of code coverage for CI pipelines.
(cherry picked from commit fa2be89cd4)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-11-09 23:29:39 -08:00
Matt Clay
8f767f7180 [stable-2.10] Fix container discovery for the acme test plugin.
(cherry picked from commit f022dedd0a)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-11-09 15:30:07 -08:00
Rick Elrod
5bd0df7621
[ansible-test] use newer container images (#72126) (#72550)
Change:
- Bump default, ansible-base, distro containers
- We do NOT add fedora33 yet, because it doesn't work right on Shippable
  due to an old kernel. This will be added post-AZP.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit e7bf0696ef)
2020-11-09 14:23:48 -06:00
Matt Martz
81ce0f8fc4 Remove sanity ignores 2020-11-06 11:47:09 -06:00
Matt Martz
1f5afcd072 Various intentional tests (#72485)
* Add tests for argspec choices type=list

* Add explicit interpreter discovery tests to validate modules returning ansible_facts still set interp

* Add explicit tests for missing_required_lib

* Add explicit tests for recursive_diff

* ci_complete ci_coverage

* Update data to cover more code/tests

* ci_complete ci_coverage

* Add argspec tests for aliases, and no_log

* Forgotten file

* ci_complete ci_coverage

* Add argspec tests for type int

* ci_complete ci_coverage

* Remove incidental_k8s

* ci_complete ci_coverage

* fix missing newline

* Remove incidental_sts_assume_role

* ci_complete ci_coverage

(cherry picked from commit c8590c7482)
2020-11-06 11:47:09 -06:00
Matt Martz
65470f48bd Remove incidental tower integration tests (#72461)
* Add explicit test for dict repr in argspec

* Add explicit test for undefined repr

* ci_complete ci_coverage

* Skip old jinja2

* ci_complete ci_coverage

* Remove incidental_tower_receive

* ci_complete ci_coverage

* Remove incidental_tower_credential_type

* ci_complete ci_coverage

* Remove ignore entries

* ci_complete ci_coverage

(cherry picked from commit 880087748c)
2020-11-06 11:47:09 -06:00
Matt Martz
e555358c32 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

(cherry picked from commit ccc63abc8e)
2020-11-06 11:47:09 -06:00
Matt Martz
5b5870886b 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

(cherry picked from commit 6543c7bc5d)
2020-11-06 11:47:09 -06:00
Matt Martz
73991233fb Remove incidental_zabbix_host (#72142)
* Add explicit apt tests for fnmatch and update_cache

* Add explicit apt_key tests for fetching key directly from url

* ci_complete ci_coverage

* Remove repo only by repo

* ci_complete ci_coverage

* Add apt cache update after apt_repository to show that the cache doesn't update

* ci_complete ci_coverage

* Add systemd tests for enabling and disabling a service

* ci_complete ci_coverage

* Remove incidental_zabbix_host

* ci_complete ci_coverage

(cherry picked from commit 2f8dbf673e)
2020-11-06 11:47:09 -06:00
Matt Martz
dca64d3c74 Remove incidental_aws_codebuild (#72140)
* Remove incidental_aws_codebuild

* ci_complete ci_coverage

(cherry picked from commit cf0cd4b50b)
2020-11-06 11:47:09 -06:00
Felix Fontein
ce47796db9
Add info on how to contribute to **community**-maintained collections as well. (#72494) (#72512)
(cherry picked from commit da1c1e8bb8)
2020-11-06 11:42:18 -06:00
Sam Doran
8c5910efe7
[stable-2.10] [dnf] Some fixes around filtering (#72483) (#72500)
* [stable-2.10] [dnf] Some fixes around filtering (#72483)

Change:
- Docs: Add note that security/bugfix apply to dependencies too, like
  the dnf command.

- dnf: security/bugfix only makes sense for updates, so limit the
  package query sack to available updates.

- tests: Limit tests to our known-good test packages, so that RHEL
  packages marked security/bugfix without similarly marked dependencies
  don't fail our tests.

Test Plan:
- Tested with `dnf upgrade-minimal --bugfix` and reproduced the same
  error currently seen in CI, showing that we are consistent with what
  dnf does.

Tickets:
- Likely fixes #72316

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit d8c637da37)

Co-authored-by: Rick Elrod <rick@elrod.me>

* Add changelog (#72502)

(cherry picked from commit b33d7e2e29)

Co-authored-by: Rick Elrod <rick@elrod.me>
2020-11-06 08:56:18 -06:00
Sandra McCann
31ab3d8a64
clarify upstream release status of 2.10 (#72269) (#72489)
* clarify upstream release status of 2.10

(cherry picked from commit d76f85208d)
2020-11-05 14:34:53 -06:00
Rick Elrod
10871f3246 Update Ansible release version to v2.10.3.post0. 2020-11-02 19:04:58 -06:00
Rick Elrod
3e9afdae2e New release v2.10.3 2020-11-02 15:34:41 -06:00
Matt Martz
7cd080b10d
[stable-2.10] Update pip tests to omit install dev extras to avoid dep issues (#72436) (#72438)
(cherry picked from commit 2ee5af5)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-11-02 11:05:48 -06:00
Sloane Hertel
1f485dccaa [stable-2.10] 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
(cherry picked from commit 960e4c0809)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2020-10-29 07:31:53 -07:00
Matt Clay
522f167d27
Replace incidental tests with intentional argspec tests (#72370)
* Remove incidental_consul tests (#71811)

* Add explicit intg tests for argspec functionality

* ci_complete ci_coverage

* Remove incidental_consul and incidental_setup_openssl

* ci_complete ci_coverage

(cherry picked from commit a99212464c)

* 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

(cherry picked from commit 6f4aed5377)

* 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

(cherry picked from commit 9081b22868)

* 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

(cherry picked from commit ab2b339dd6)

* 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

(cherry picked from commit 460ba041c8)

* 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

(cherry picked from commit 50c8c87fe2)

* Add explicit coverage of argspec choices with strings that shadow YAML bools (#72122)

* Add explicit coverage of argspec choices with strings that shadow YAML bools

* ci_complete ci_coverage

* Remove incidental_ufw

* ci_complete ci_coverage

(cherry picked from commit cfa41898c4)

* 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.

(cherry picked from commit 1489bf9190)

* Remove incidentals without coverage (#71788)

* Remove incidental_lookup_hashi_vault
* Remove incidental_connection_chroot
* Remove incidental_selinux
* Remove incidental_win_hosts

(cherry picked from commit e6e9840717)

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-28 09:12:09 -07:00
Rick Elrod
dcae6d20d2 Update Ansible release version to v2.10.3rc1.post0. 2020-10-26 19:01:43 -05:00
Rick Elrod
10922d58f0 New release v2.10.3rc1 2020-10-26 14:32:55 -05:00
Matt Davis
69d5ce9b41
Remove ansible-galaxy login (#72288) (#72320)
* 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 porting guide entry

* remove dead code/config, update messages and porting guides

(cherry picked from commit 83909bfa22)
2020-10-26 14:31:52 -05:00
Rick Elrod
4159c73db2
[ansible-test] Limit cryptography to <3.2 (#72342) (#72345)
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 13:44:16 -05:00
Felix Fontein
69744aa0a7
[2.10] Fix various sanity errors in plugins (#72168)
* 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.

(cherry picked from commit aff78f4cbc)

* Undo potentially disrupting normalizations.

* Add changelog fragment for #71736. (#72323)

(cherry picked from commit 0b2b82c0b6)
2020-10-24 06:03:18 -05:00
Sam Doran
8471814f86
[stable-2.10] Fix the reversed order of return values (#72088) (#72300)
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.

Co-authored-by: Ruediger Pluem <53253255+rpluem-vf@users.noreply.github.com>
2020-10-23 15:58:23 -05:00