Commit graph

702 commits

Author SHA1 Message Date
Matt Davis
0623dedf2d New release v2.7.15 2019-11-13 12:40:08 -08:00
Matt Davis
75288a89d0
Callback: removing args from task_fields from Sumologic and Splunk plugin(#63527) (#64748)
CVE-2019-14864 Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs

Fixes #63522

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit c76e074e4c)
2019-11-12 17:03:31 -08:00
Toshio Kuratomi
71affa9d7c New release v2.7.14 2019-10-17 09:46:03 -07:00
Sam Doran
0fd656e996 [stable-2.7] Properly mask no_log values is sub parameters during failure (#63405)
(cherry picked from commit 156330b485)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-10-14 15:31:15 -07:00
Matt Martz
40618d70e6 [stable-2.7] Wrap CLI passwords as AnsibleUnsafeText (#63352) (#63392)
* [stable-2.7] Wrap CLI passwords as AnsibleUnsafeText (#63352)

* isa string should rewrap as unsafe in get_validated_value

* _is_unsafe shouldn't be concerned with underlying types

* Start with passwords as text, instead of bytes

* Remove unused imports

* Add changelog fragment

* Update changelog with CVE.
(cherry picked from commit baeff7462d)

Co-authored-by: Matt Martz <matt@sivel.net>

* Update tests
2019-10-11 10:31:10 -07:00
Toshio Kuratomi
90e74dd260 Fix for plugins which used the boto libraries leaking the boto credentials to logs
(cherry picked from commit 3753304d209f2fdc28f0b2ebf1e139eb3d8c22b1)

https://github.com/ansible/ansible/pull/63366
2019-10-10 21:21:45 -07:00
Dag Wieers
c2f528b768 Fix whitespace issue in filter (backport 2.7)
This fixes reported issue #60276

This is a backport of #62768
2019-10-08 09:14:02 -07:00
Matt Clay
dec03d06c8 [stable-2.7] Redact sensitive values by default in ansible-test.
(cherry picked from commit 0631e057e9)

Co-authored-by: Matt Clay <matt@mystile.com>.
2019-09-17 13:18:42 -07:00
Toshio Kuratomi
24007b5d4b New release v2.7.13 2019-08-15 14:07:21 -07:00
Brian Coca
d728127310 prevent templating of passwords from prompt (#59246) (#59553)
* prevent templating of passwords from prompt (#59246)

* prevent templating of passwords from prompt

  fixes CVE-2019-10206

(cherry picked from commit e9a37f8e31)

* Improve performane of UnsafeProxy __new__

This adds an early return to the __new__ method of the UnsafeProxy object
which avoids creating the unsafe object if the incoming object is already
unsafe.

(cherry picked from commit c1e23c22a9fedafaaa88c2119b26dc123ff1392e)
(cherry picked from commit 490f17c7f9)
2019-08-12 18:06:35 -07:00
Toshio Kuratomi
1fb35cd857 New release v2.7.12 2019-07-03 09:44:13 -07:00
Brian Coca
a11c3edfa4 safe_eval fix (#57188)
* just dont pass locals

 - also fix globals
 - added tests

* fixed tests

(cherry picked from commit b9b0b23015)
2019-06-17 17:17:38 -07:00
Toshio Kuratomi
a25e32f247 New release v2.7.11 2019-05-23 10:44:05 -07:00
Bill Dodd
61643874f2 Expose timeout option to Redfish modules
(cherry picked from commit d8536e47d3)
2019-05-20 18:33:27 -07:00
Nilashish Chakraborty
aa616b436c Fix VyOS cli prompt issues (#56389)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit 30ccc8e1bd)

Add changelog for vyos prompt fix
2019-05-20 18:18:25 -07:00
Sumit Jaiswal
85b21c2c9b Backport PR for fixing NIOS_ZONE module idempotency (#56346)
* To fix the issue where nios_zone module was running second time for same object (#55595)

* fix for 55128 issue

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* review comment fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
(cherry picked from commit 661f7be0fe)

* changelog for 2.7 backport

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* changelog for 2.7 backport

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* shippable fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-05-20 18:17:25 -07:00
Lars Kellogg-Stedman
a8e14cfe1f connection/docker: add privilege escalation support
As described in #53385 (and #31759), the docker connection driver did
not support privilege escalation. This commit is a shameless
cut-and-paste of the privilege escalation support from the `local`
connection plugin into the `docker` plugin.

This is a backport to stable-2.7 of #55816.
2019-05-20 18:14:48 -07:00
Strahinja Kustudic
6bc671a46a Backport/2.7/55695 (#56253)
* sysctl will now return an error if the value is invalid

sysctl can fail to set a value even if it returns an exit status 0. More
details: https://bugzilla.redhat.com/show_bug.cgi?id=1264080. Because of
this in case of an invalid value or a read-only file system, sysctl
module would return OK, even though it didn't set anything. To be sure
that sysctl correctly applied the changes we also need to check the
output of stderr.

(cherry picked from commit 0432b7f2522dbf82c4fabdb3fd17f7ac83f34e62)

* Run sysctl with LANG=C

Because we are parsing sysctl stderr we need to make sure that errors
are persistent across different system language settings.

(cherry picked from commit a16128f778b1e7574c5986aed26e146ac0561533)

* Add changelog fragment for sysctl

(cherry picked from commit 3ad9d4d83c1d2bbfccefb8388904c596d98f8731)
2019-05-20 18:10:31 -07:00
Felix Fontein
d9d5cca69e oom_killer and oom_score_adj are available since docker-py 1.8.0. (#56012)
* oom_killer and oom_score_adj are available since docker-py 1.8.0.

* Add changelog.

(cherry picked from commit f692261ea0)
2019-05-20 11:12:35 -07:00
Felix Fontein
5daef29e4d docker_container: use restart() API function instead of stop/start sequence (#55894)
* Improve container restart.

* Adjust tests.

* Add changelog.

* Quote options.

* Move tests for restart/recreate options to start/stop tests.

* Fix changelog name.

(cherry picked from commit 95d1564f70)
2019-05-20 09:26:33 -07:00
Jordan Borean
3db80f68f7 win_acl - fix network path qualifier parsing (#55970)
(cherry picked from commit cc3b8b9f72)
2019-05-17 23:20:10 -04:00
Sam Doran
b394d309f1 [stable-2.7] User - Fix shadow file parsing on AIX (#55230)
Implement a new method for shadow file parsing so it can be subclassed..
(cherry picked from commit f27eccabbd)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2019-04-24 18:11:00 -06:00
René Moser
8a8c9ed089 vultr_server: fix idempotency for private network and IPv6 options (#55619)
* vultr_server: fix idempotency for private network and IPv6 options

* add changelog

(partly cherry picked from commit 1705ef5f26)
2019-04-24 18:09:56 -06:00
Hannes Ljungberg
6f3b0e7177 [2.7] docker_swarm_service: Pass correct types on secrets/configs gid,uid,mode (#55617)
* Pass correct types on secrets/configs gid,uid,mode

* Add changelog fragment

* Fix idempotency
2019-04-23 22:05:17 -06:00
Nathaniel Case
f31374914f [stable-2.7] Move missing library abort to use rather than import (#55648)
* [stable-2.7] Move missing library abort to use rather than import for netconf (#55384).
(cherry picked from commit b442706b54)

Co-authored-by: Nathaniel Case <this.is@nathanielca.se>

* Add changelog

* missing_required_lib not in 2.7
2019-04-23 20:31:25 -06:00
Robert Osowiecki
9aa9c11a1a vsphere_guest: corrected fix #19716 misbehaviour (#55285)
* creating machines without vm_extra_config is possible
* power state operation on absent machines will fail

(cherry picked from commit 93758a5141)
2019-04-23 20:28:18 -06:00
Felix Fontein
ed1640e9dc [2.7] docker_container: fix support for docker-py 1.7.0 (#55496)
* In theory, some 2.7 modules support docker-py 1.7.0.

* Add changelog.
2019-04-23 20:27:16 -06:00
Jordan Borean
e51edbfa1e win_region - fix format issues when using psrp (#55487)
(cherry picked from commit f247c21d23)
2019-04-23 20:26:29 -06:00
Jordan Borean
ab725bb86e psrp - Fix raw and script tests for connection plugin (#55357)
* psrp - Fix raw and script tests for connection plugin

* Fix error propagation with raw in psrp

* uncomment test

(cherry picked from commit fdf9df89f5)
2019-04-17 06:56:49 -07:00
Christopher Snyder
ad953171eb redhat_subscription: Fix usage of ConfigParser (#54815)
(cherry picked from commit 09f68fc659)
2019-04-16 16:56:18 -07:00
Jordan Borean
8d259f6e64 psrp - fix test_command rc for win_reboot (#55354)
(cherry picked from commit 49655a452d)
2019-04-16 16:55:54 -07:00
Jordan Borean
08c2fb8626 psrp - Fix fetch for large files (#55351)
* psrp - Fix fetch for large files

* Fix typo

(cherry picked from commit 52946c49a4)
2019-04-16 16:35:18 -07:00
Dag Wieers
653e9da228 ACI: Ensure we use native strings for signature (#55161)
* ACI: Ensure we use native strings for signature

* Add changelog fragment
2019-04-16 15:35:36 -07:00
Trishna Guha
ca49ae7ba5 nxos_interface DI delay only when operation state check is requested (#55355)
* nxos_interface:DI: delay only when operation state check is requested (#54862)

* nxos_interface:DI: should only use delay when operation state check is requested

There is a 10 second delay that is added for every interface that is changed.
This delay should only occur when a task sets one of the `want` vars.

* /return/continue/

(cherry picked from commit 0fe6bf911a)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-04-16 15:02:07 -07:00
Kevin Breit
1435b6771a meraki_vlan - Remove unnecessary API calls when net_id is specified (#54939)
* Remove unnecessary API calls when net_id is specified

* Remove temp_get_nets commented out code

(cherry picked from commit fb3cc7f687)
2019-04-16 15:01:19 -07:00
Mario Lenz
3604fe8517 backport #55193 to 2.7 2019-04-16 15:00:22 -07:00
Felix Fontein
f27481a6e8 docker_container: improve log_options idempotency by converting to string (#54955)
* Warn when log_options values are not strings.

* Add changelog.

* Improve message.

* Improve formatting and formulation of other messages.

* Add test for warning.

* Trying double escaping.

(cherry picked from commit d64b17731d)
2019-04-16 14:59:19 -07:00
Brian Coca
bcf0770a04 remove become_plugins ref from backported fix 2019-04-15 14:01:28 -07:00
Jordan Borean
fb96c007b5 win_domain - fix for checking for domain on new host (#55195)
(cherry picked from commit 6039ff9a24)
2019-04-12 12:28:27 -07:00
Brian Coca
5d58a7cadb Correct plugin loader context for persistent (#54860)
* Correct plugin loader context for persistent

(cherry picked from commit 6579dfda17)
2019-04-12 12:28:03 -07:00
Tobias Rüetschi
a79c57b1e1 Backport/2.7/55083 (#55141)
* The Univention modules have a issue with an unassigned variable.

The variable diff is only assigned if state is 'present', else the
variable is unused. But the module will return the diff variable as a
return value. If the state isn't 'present' the module will fail with an
python UnboundLocalError exception.

(cherry picked from commit 26fa97922abb9bc197af5745e83c235c2d652116)

* Add a changelog fragment for PR 55083.

(cherry picked from commit b4ae654890a606bf5321c6b1a612d77de9ef47dd)
2019-04-12 12:20:36 -07:00
Paul Puschmann
4b28413446 Backport/2.7/50183 (#55035)
* gcp: documentation update (#50183)

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

(cherry picked from commit ae404d1476)

* Add changelog-document for gcp_inventory improvement
2019-04-10 11:50:06 -05:00
Robert Osowiecki
910d21e15c Allow all of yum version compare operators (#54603)
* Allow all of yum version compare operators

* * yum: name="foo >= VERSION" integration test
* changelog fragment

(cherry picked from commit 1532e31ec0)
2019-04-08 10:28:24 -07:00
Adam Miller
d262f35789 fix dnf module removal in dnf upstream 4.2.2+ (#54923)
* fix dnf module removal in dnf upstream 4.2.2+

Signed-off-by: Adam Miller <admiller@redhat.com>

* Remove extra blank line in changelog fragment.
2019-04-08 10:19:02 -07:00
Felix Fontein
712e79eb5e ufw: fix default, direction is not necessary for it (#54799)
* Correct behavior so that direction isn't required for default.
* Add more tests.
* 'disabled' values cannot be changed.
* Include 'not specified' in messages.

(cherry picked from commit 7d27348356)
2019-04-08 10:18:14 -07:00
Kevin Breit
737cd948d6 Meraki performance fixes for net and org lookups (#51395)
* Performance fixes for net and org lookups
- Both methods had duplicate lookups
- This should significantly improve performance
- Currently untested

* Add ChangeLog file

* Change from bugfix to bugfixes and change indent

(cherry picked from commit c254b93796)
2019-04-04 12:06:38 -07:00
Felix Fontein
eeb6ec1097 acme_certficate: allow to write files to CWD (#54754)
* Allow to write files to CWD.

* Add changelog.

(cherry picked from commit e422f18898)
2019-04-04 12:03:55 -07:00
Martin Krizek
a8a318e588 Fix copy module to reset filesystem acls (#51868)
The controller's fixup_perms2 uses filesystem acls to make the temporary
file for copy readable by an unprivileged become user. On Python3, the
acls are then copied to the destination filename so we have to remove
them from there.

We can't remove them prior to the copy because we may not have
permission to read the file if the acls are not present. We can't
remove them in atomic_move() because the move function shouldn't know
anything about controller features. We may want to generalize this into
a helper function, though.

Fixes #44412

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
(cherry picked from commit d15812fabf)
2019-04-04 12:03:03 -07:00
Trishna Guha
b79d1002f8 changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-04-04 11:59:35 -07:00
Ganesh B Nalawade
b6f52a4b81 Fix netconf plugin dispatch response
Fixes #53236

*  If dispatch() rpc response has data element
   return the xml string from `<data>` element
   else return the complete xml string from
   `<rpc-reply>`.

(cherry picked from commit aac5ef5e13e692c09bfd30772311733878b01035)
2019-04-04 11:59:13 -07:00