Commit graph

2316 commits

Author SHA1 Message Date
Martin Krizek
0c32a4f793
Emit proper error for x in y when y is undefined (#70990) (#71011)
Fixes #70984

(cherry picked from commit bf7276a4e8)
2020-08-27 13:46:52 -05:00
Sam Doran
0c6edb34f9
[stable-2.10] unarchive - Check 'fut_gid' against 'run_gid' in addition to supplemental groups (#65666) (#71001)
* [stable-2.10] unarchive - Check 'fut_gid' against 'run_gid' in addition to supplemental groups (#65666)

Add integration tests for unarchiving as unprivileged user
Break tasks into separate files for easier reading and maintenance

Create a user by specifying a default group of 'staff' for macOS.

The user module does not actually remove the user directory on macOS,
so explicitly remove it.

Put the removal tasks in an always block to ensure they always run

Co-authored-by: Philip Douglass <philip.douglass@amadeus.com>
Co-authored-by: Sam Doran <sdoran@redhat.com>
(cherry picked from commit ac5f3f8bef)

Co-authored-by: Philip Douglass <philip@philipdouglass.com>

* [stable-2.10] Fix unstable unarchive test (#71004)

* Add mode to copy tasks
* Fix unreliable test by ignoring errors

(cherry picked from commit f99f96ceb6)

Co-authored-by: Philip Douglass <philip@philipdouglass.com>
2020-08-27 13:45:19 -05:00
Abhijeet Kasurde
a253c93fd1
[2.10] iptables: Add a note about ipv6-icmp (#71010)
ipv6-icmp and icmpv6 are valid protocols and adding note about
it in protocol parameter.

Fixes: #70905

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit e139739ab3)
2020-08-27 13:43:11 -05:00
Sloane Hertel
714cd2ad2e
copy - redact 'content' from invocation in check mode (#71033) (#71067)
* sanitize copy module invocation secrets in check mode

(cherry picked from commit 991714b9d1)
2020-08-27 13:41:14 -05:00
Jordan Borean
f41ff33ca6
ansible-galaxy - fix download for subdirs in SCM (#71005) (#71093)
(cherry picked from commit f6b3b4b430)
2020-08-27 13:39:54 -05:00
Brian Coca
00caeff928
dont clobber facts in loop (#71032) (#71095)
(cherry picked from commit f9af27c631)
2020-08-27 13:39:19 -05:00
Toshio Kuratomi
6b639f147d
[stable-2.10] Update ansible doc formats (#71070) (#71111)
* Fix tty_ify bugs and refactor

* Move tty_ify() and supporting attributes to the DocCLI class as that's
  the only thing using it.
* Add unittest for the code.
* Fix a bug where the substitution macros can be detected when they are
  a part of another word.
* Add support for L(), R(), and HORIZONTALLINE which were added to the
  website docs many years ago.

* Update test/units/cli/test_doc.py

Co-authored-by: Matt Clay <matt@mystile.com>

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit fb144c4)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2020-08-27 13:33:24 -05:00
Jordan Borean
4b1df6cc05
Remove ANSIBLE_COLLECTIONS_PATHS dep warning (#71094) (#71099)
(cherry picked from commit aab9beccf7)
2020-08-27 13:26:17 -05:00
Felix Fontein
e33fff922a
ansible-test: bump acme test container version to 2.0.0 (#71097) (#71165)
(cherry picked from commit 050841324c)
2020-08-27 12:58:06 -05:00
Jordan Borean
092ec680e6
Ensure -k is set to delegated hosts without a pass (#71136) (#71168)
* Ensure -k is set to delegated hosts without a pass

* Fix up some broken tests

* Update task_executor.py

one possible fix, the other is updating winrm to normalize on 'password' like the other connection plugins

* Add alias for winrm and fix incorrect assumption

* Make sure aliases are used for keyword options

* Conditionally run test if sshpass is present, fix sanity

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
(cherry picked from commit 3f22f79e73)
2020-08-27 12:57:24 -05:00
GomathiselviS
e95b45c5ec
Update network integration auth timeout (#71057) (#71238)
*  Incase of network integration test for connection local
   test the paramiko_ssh auth_timeout is the value of timeout
   under defaults section which is 10 seconds.
*  For slower connection 10sec timout value result in authentication
   timeout error hence increase the timeout value to 90 seconds

(cherry picked from commit 6160e82bf2)

Co-authored-by: Ganesh Nalawade <ganesh634@gmail.com>
2020-08-27 12:55:04 -05:00
Rick Elrod
7b3d2a00a0
Fix cron file regression (#71207) (#71243)
Co-authored-by: Florent PIGOUT <toopy@users.noreply.github.com>
2020-08-27 12:54:15 -05:00
Ganesh Nalawade
67b2b8caf1
Fix netconf validate capability check (#71195) (#71252)
*  Use ``:validate`` string to check if the netconf
   server supports validate capability as per netconf RFC

(cherry picked from commit 7635d23cee)
2020-08-27 12:52:49 -05:00
Ganesh Nalawade
ca118613aa
Fixes https://github.com/ansible-collections/cisco.iosxr/issues/74 (#71292)
*  ncclient API expects commit timeout value in either unicode
   or bytes format, hence convert the timeout value explicitly
   to string type.
2020-08-27 12:47:40 -05:00
Martin Krizek
02f4fc1a14
Skip literal_eval for string filters results in native jinja. (#70988) (#71313)
Fixes #70831

(cherry picked from commit b66d66027e)
2020-08-27 12:47:02 -05:00
Matt Martz
90a8d07f31
[stable-2.10] Don't do conflict check on sdist and egg_info (#71310) (#71316) 2020-08-27 12:44:30 -05:00
Matt Martz
c04a751f0e
Reject unknown types from results queue. Fixes #70023 (#71336) 2020-08-27 12:43:20 -05:00
Matt Martz
3f41c76564
[stable-2.10] Allow the TOML inventory to dump unsafe. Fixes #71307 (#71309) (#71317)
(cherry picked from commit 9da8801)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-08-27 12:35:36 -05:00
Matt Martz
6d1cc0dede
[stable-2.10] epoch can be a float with strftime filter. Fixes #71257 (#71314) (#71319)
(cherry picked from commit 6289570)

Co-authored-by: Matt Martz <matt@sivel.net>
2020-08-27 12:35:21 -05:00
Lorenzo Castelli
ac248cf34a
systemd - supports new systemctl output message for chroot (#71197) (#71330)
The message generated by systemctl has been updated in 9321e23c40, which requires a corresponding change in the systemd module.

In addition, this fixes the module when the SYSTEMD_OFFLINE environment variable is set.

(cherry picked from commit a1a50bb3cd)
2020-08-27 12:34:59 -05:00
Sloane Hertel
4cfe2cf8dc
Fix meta tasks used with --flush-cache (#71311) (#71358)
* Remove incorrect code

(cherry picked from commit 88bfc7977d)
2020-08-27 12:23:58 -05:00
Martin Krizek
724b3648ea
_check_failed_state: always use the current/nested state (#71347) (#71457)
Fixes #71306

(cherry picked from commit 9792d631b1)
2020-08-27 12:22:45 -05:00
Felix Fontein
1252323e34
Make changelog tool be more strict about suffixes (#70909) (#71135)
* Bump antsibull-changelog version.

* Flag all dotfiles, except .keep and .gitkeep.

* Enable ignoring other fragment extensions.

(cherry picked from commit fbfc0f99eb)
2020-08-21 09:33:08 -07:00
Sandra McCann
26bb114ccb
[backport][docs][2.10]Docsbackportapalooza 8 (#71379)
* Move 2.10.0rc1 release date a few days forward. (#71270)

At yesterday's meeting it was decided to have ansible-2.10.0 depend on
ansible-base-2.10.1 so that we can get several fixes for ansible-base's
routing (including adding the gluster.gluster collection).
ansible-base-2.10.1 will release on September 8th.  So we will plan on
releasing ansible-2.10.0rc1 on the 10th.

https://meetbot.fedoraproject.org/ansible-community/2020-08-12/ansible_community_meeting.2020-08-12-18.00.html
(cherry picked from commit e507c127e5)

* a few writing style updates (#71212)

(cherry picked from commit 4f0bd5de38)

* Fix code markups and add link to CVE (#71082)

(cherry picked from commit 92d59a58c0)

* Fix 404 links (#71256)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit ecea018506)

* Writing style updates to Developing dynamic inventory topic (#71245)

* modified the writing style

* incorporated peer feedback

(cherry picked from commit ecd3b52ad7)

* Fix roadmap formatting. (#71275)

(cherry picked from commit ee48e0b0ad)

* Update password.py (#71295)

List md5_crypt, bcrypt, sha256_crypt, sha512_crypt as hash schemes in the password plugin.

(cherry picked from commit 1d1de2c6fd)

* Update ansible european IRC channel (#71326)

Signed-off-by: Rémi VERCHERE <remi@verchere.fr>
(cherry picked from commit 824cd4cbeb)

* Add warning about copyright year change (#71251)

To simplify project administration and avoid any legal issues,
add a warning in the docs. This reflects - https://github.com/ansible/ansible/issues/45989#issuecomment-423635622 and fixes: #45989

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 606604bb97)

* subelements: Clarify parameter docs (#71177)

skip_missing parameter in subelements lookup plugin is accepted from
inside the dictionary.

Fixes: #38182

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6d17736ef4)

* Writing style updates to Using Variables topic (#71194)

* updated topic title, underline length for headings, and incorporated peer feedback

(cherry picked from commit 4d68efbe24)

* cron module defaults to current user, not root (#71337)

(cherry picked from commit 4792d83e13)

* Update Network Getting Started for FQCN/collection world (#71188)

* pull out network roles, cleanup, update first playbook examples, update gather facts section, some inventory conversion to .yml, update inventory and roles, simplify the navigation titles, fix tocs, feedback comments

(cherry picked from commit f79a7c5585)

* Add documentation about info/facts module development (#71250)

Fixes: #40151

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 4f993922c8)

* network: Correct documentation (#71246)

ini-style inventory does not support Ansible Vault password.
This fixes network_best_practices_2.5 doc.
Fixes: #69039

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit a1257d75aa)

* tidies up vars page (#71339)

(cherry picked from commit 02ea80f6d7)

* base.yml: Fix typos (#71346)

(cherry picked from commit 41d7d53573)

* quick fix to change main back to devel (#71342)

* quick fix to change main back to devel
* Update docs/docsite/rst/dev_guide/developing_collections.rst

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 74f88c56a5)

* Add note about integration tests for new modules to the dev guide (#71345)

(cherry picked from commit b82889eef5)

* update fest link (#71376)

(cherry picked from commit 80b8fde946)

* incorporate minimalism feedback on debugging page (#71272)

Co-authored-by: bobjohnsrh <50667510+bobjohnsrh@users.noreply.github.com>

(cherry picked from commit 5073cfc8bc)

* fix header problem

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
Co-authored-by: Sayee <57951841+sayee-jadhav@users.noreply.github.com>
Co-authored-by: Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: rovshango <rovshan.go@gmail.com>
Co-authored-by: Remi Verchere <rverchere@users.noreply.github.com>
Co-authored-by: Jake Howard <RealOrangeOne@users.noreply.github.com>
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Per Lundberg <perlun@gmail.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-08-20 17:44:50 -05:00
Felix Fontein
aa51c6000a
Fix fortimanager httpapi redirect (#71073) (#71081)
* The fortimanager httpapi plugin is in fortinet.fortimanager, not in fortinet.fortios.

* Add changelog fragment.

(cherry picked from commit 4bd7580dd7)
2020-08-19 13:29:55 -05:00
Felix Fontein
a06730cdb0
Redirect gluster modules to gluster.gluster. (#71240) (#71264)
(cherry picked from commit 9f72ff80e3)
2020-08-19 13:28:01 -05:00
Matt Davis
3b9ee86381 [stable-2.10] fix collection package root location under pytest >=6.0.0 (#70963)
(cherry picked from commit 86b6c4bbb6)

Co-authored-by: nitzmahone <nitzmahone@users.noreply.github.com>
2020-08-17 11:16:08 -07:00
Rick Elrod
a6ed955132 New release v2.10.0 2020-08-13 12:30:50 -05:00
Rick Elrod
6e3271aa61
[stable-2.10] Revert default mode changes (#71260)
* Revert "[stable-2.10] Revert "Change default file permissions so they are not world readable (#70221) (#70824)" (#71236)"

This reverts commit c968020d52.

* Revert "Remove porting guide entry related to reverted change (#71242)"

This reverts commit 006a21eae2.
2020-08-13 12:17:47 -05:00
Sam Doran
c968020d52
[stable-2.10] Revert "Change default file permissions so they are not world readable (#70221) (#70824)" (#71236)
* [stable-2.10] Revert "Fix warning for new default permissions when mode is not specified (#70976) (#70985)"

This reverts commit 5cb96087e6.

* [stable-2.10] Revert "Change default file permissions so they are not world readable (#70221) (#70824)"

This reverts commit 7e4cffc5d2.
2020-08-12 14:30:47 -05:00
Rick Elrod
4b03d898f3
Update integration tests to support rpmfluff-0.6 (#71155) (#71159)
Co-authored-by: Matt Martz <matt@sivel.net>
2020-08-07 14:52:17 -05:00
Rick Elrod
a187613da8
Add CVE reference to changelog for PR 70762 (#71151) (#71156)
Co-authored-by: David Shrewsbury <Shrews@users.noreply.github.com>
2020-08-07 11:50:34 -05:00
Rick Elrod
3900f82d00 New release v2.10.0rc4 2020-07-30 16:17:16 -05:00
Sloane Hertel
9f4748cb2d
fix downloading collections in git repos and tar.gz artifacts (#70524) (#71000)
* Fix downloading tar files

* Fix downloading SCM collections

* changelog

(cherry picked from commit 54e2ae79e7)
2020-07-30 13:37:59 -07:00
Sam Doran
719c40bfdf
[stable-2.10] facts - fix incorrect time for some date_time_facts (#70665) (#70996)
* [stable-2.10] facts - fix incorrect time for some date_time_facts (#70665)

The iso8601_micro and iso8601 facts incorrectly called now.utcnow(), resulting
in a new timestamp at the time it was called, not a conversion of the previously
stored timestamp.

Correct this by capturing the UTC timestamp once then calculating the local
time using the UTC offset of the current system.

* Use time.time() for getting the current time
* Convert from that stored epoch timestamp to local and UTC times
* Used existing timestamp for epoch time
* Add unit tests that validate the formate of the return value rather than an exact value since mocking time and timezone is non-trivial
(cherry picked from commit c4f442ed5a)

Co-authored-by: Sam Doran <sdoran@redhat.com>

* Remove tests for tz_dst since that only exists in newer versions
2020-07-30 13:37:19 -07:00
Matt Clay
b764d381f0
[stable-2.10] Fix ansible-test relative import analysis. (#70993)
(cherry picked from commit 2e0097ada3)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-07-30 13:36:49 -07:00
Akira Yokochi
abfedb06c3
default_callback: Move 'check_mode_markers' in doc_fragments (#70228) (#70989)
Callback plugin dense, yaml, and debug implement 'check_mode_markers'
so moving documentation to default callback doc_fragments.

Fixes: https://github.com/ansible-collections/community.general/issues/565

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 4885ebad27)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-30 13:36:24 -07:00
Sam Doran
5cb96087e6
Fix warning for new default permissions when mode is not specified (#70976) (#70985)
Follow up to #70221
Related to #67794
CVE-2020-1736

When set_mode_if_different() is called with mode of 'None', ensure we issue
a warning about the change in default permissions.

Add integration tests to ensure the warning works properly.

* Fix tests
- actually use custom module 🤦‍♂️
- verify file permission on created files
- use remote_tmp_dir so we're ready for split controller
- improve test module so we can skip the call to set_fs_attributes_if_different()
- fix tests for CentOS 6

(cherry picked from commit dc79528cc6)
2020-07-30 10:10:23 -07:00
Jordan Borean
a8217f1bd4
ansible-galaxy - fix fallback for AH searches (#70957) - 2.10 (#70980)
* ansible-galaxy - fix fallback for AH searches (#70957)

(cherry picked from commit b1cb2553af)

* Fix tests after backport
2020-07-30 10:08:25 -07:00
Brian Coca
a75b3601d9
Allow changed/failed mgmt on strategy actions (#70919) (#70968)
* Allow changed/failed mgmt on strategy actions

(cherry picked from commit f9c3c6cba6)
2020-07-29 14:32:33 -07:00
Felix Fontein
c39e536d84
validate-modules: fix version_added validation for top-level, fix error codes (#70869) (#70947)
* Also validate top-level version_added.

* Fix error code.

* Produce same version_added validation error in schema than in code (and stop returning it twice).

* Return correct error codes for invalid version_added for options and return values.

* Add changelog.

* Fix forgotten closing braket.

* Accept 'historical' for some top-level version_added.

(cherry picked from commit 7e2cc7db12)
2020-07-29 13:54:45 -07:00
Sam Doran
6f70d40d51
[stable-2.10] lineinfile - fix broken exception handling (#70846) (#70944)
* prevent (ExceptionType) is not subscriptable errors
* tweak error message and use text conversion
* add to_text import
(cherry picked from commit 45c2eb6c0a)

Co-authored-by: nitzmahone <nitzmahone@users.noreply.github.com>

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-07-29 13:53:54 -07:00
Sam Doran
293d6c59bb
[stable-2.10] reboot - fix Void Linux (#70704) (#70916)
Add entry for appropriate commands for Void Linux
(cherry picked from commit 4cc4cebc97)

Co-authored-by: fosslinux <fosslinux@aussies.space>

Co-authored-by: fosslinux <fosslinux@aussies.space>
2020-07-29 13:52:45 -07:00
Felix Fontein
155041d8ee
Fix ansible-test error in community.aws (#70507) (#70873)
* Fix ansible-test error in community.aws

* Add changelog entry for fix

* Change check from None to string_types

* Update changelogs/fragments/70507-validate-null-author.yaml

clarify wording "or a list of strings"

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py

clarify wording - single string or not specified valid

Co-authored-by: Felix Fontein <felix@fontein.de>

* Do not fail but return None when given outside list

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b0d9deeae3)

Co-authored-by: Alan Rominger <arominge@redhat.com>
2020-07-29 13:51:47 -07:00
Matt Clay
4280efccc4 [stable-2.10] Cap pytest version to avoid relative import issue.
(cherry picked from commit 3a8ac62596)

Co-authored-by: Matt Clay <matt@mystile.com>
2020-07-28 17:14:30 -07:00
Rick Elrod
f28fa88448 New release v2.10.0rc3 2020-07-24 15:59:04 -05:00
Brian Coca
9b992c0b78
reset logging to INFO (#70878) (#70881)
- due to CVE-2019-14846
 - also added comments and test to avoid 'oportunistic' reversion

(cherry picked from commit 1223ce656a)
2020-07-24 15:47:57 -05:00
Rick Elrod
c528e648a6 New release v2.10.0rc2 2020-07-23 21:38:44 -05:00
Jordan Borean
e9c9c02e0a
Do not add connection vars to the output results (#70853) (#70855)
* Do not add connection vars to the output results

* Also revert the delgated scenario JIC

* Added regression test

(cherry picked from commit 5e1a968983)
2020-07-23 19:48:45 -05:00
Rick Elrod
3ee5b46ba7 New release v2.10.0rc1 2020-07-23 14:44:50 -05:00