Commit graph

33588 commits

Author SHA1 Message Date
Toshio Kuratomi
0b0d8a0c03 Add changelog entry for error message wrapping 2018-03-19 08:11:20 -07:00
Pilou
4f071bdc2f Connection error messages are unsafe: wrap them (#37329)
* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied

(cherry picked from commit 4378542ac7)
2018-03-19 08:10:10 -07:00
Toshio Kuratomi
850224dd5e Add ovirt_vms fix to changelog 2018-03-19 07:59:09 -07:00
Ondra Machacek
2e30e2c8f2 ovirt_vms: Pass correct VM entity to create method (#37460)
(cherry picked from commit 9f02fea15b)
2018-03-19 07:52:19 -07:00
Toshio Kuratomi
0df8924b35 Add openssl_certificate python3 fix to the changelog
(cherry picked from commit 282fbfa7764fee5ec56046d1b248813e42107b6c)
2018-03-19 07:50:40 -07:00
Michael Scherer
0f8b06a8f6 write need bytes object on python 3 (#35143)
Otherwise, it fail with:

    Traceback (most recent call last):
      File \"/tmp/ansible_c1zmq3i9/ansible_module_openssl_certificate.py\", line 808, in <module>
        main()
      File \"/tmp/ansible_c1zmq3i9/ansible_module_openssl_certificate.py\", line 787, in main
        certificate.generate(module)
      File \"/tmp/ansible_c1zmq3i9/ansible_module_openssl_certificate.py\", line 692, in generate
        certfile.write(str(crt))
    TypeError: a bytes-like object is required, not 'str'

(cherry picked from commit 347b5d1e50)
2018-03-19 07:50:40 -07:00
s-hertel
02e591746c Use hyphens in bucket name instead of underscores
As of March 1st underscores are not supported in us-east-1
2018-03-15 13:27:11 -07:00
Matt Clay
7fdc56724a Disable failing github_issue integration test.
(cherry picked from commit 30bb70cf2d)
2018-03-14 16:16:41 -07:00
jjshoe
3fe258e7d5 Document that this module was renamed recently (#37420)
(cherry picked from commit ff15a9e7e2)
2018-03-14 11:37:29 -07:00
Jordan Borean
1f888d9f51 powershell: backport of environment key and value fix 2018-03-08 15:00:37 -08:00
James Mighion
df0f9d1d91 Fixing module docs so they dont show up as a list on ansible docs. (#37203)
* Fixing module docs so they dont show up as a list on ansible docs.

* Fixing spacing in description.
2018-03-08 13:03:20 -08:00
John R Barker
b025f7ea7c yum is Python 2 only. If Python 3 use dnf (#37140)
* PY3 = dnf

Red Hat are unlikely to provide a Python 2 version of the yum bindings
as they are moving to `dnf`.

If Ansible can't find the yum Python library give the user a hint about
dnf and Python 3

(cherry picked from commit 6c8d40f653)
2018-03-08 00:37:25 -08:00
Toshio Kuratomi
3667a0d1cc Add unarchive fix to changelog 2018-03-07 18:43:21 -08:00
Toshio Kuratomi
c37e2e5d6e Fix unarchive with strip-components in extra_opts (#37048)
* Fix unarchive with strip-components in extra_opts

When unarchive is given extra_opts to strip all leading directories, it
could end up trying to change the permissions on the root directory.
Tar archives shouldn't contain absolute paths anyways so make sure that
all paths are relative as we handle them.

Fixes #21397

(cherry picked from commit cca0ccaf97)
2018-03-07 18:42:44 -08:00
Matt Martz
7264d13991 Backport #37151 for 2.4 (#37153)
* Add ansible-config and ansible-inventory to setup.py scripts (#37151)

(cherry picked from commit bd43776acf)

* Add changelog entry for #37151
2018-03-07 15:02:00 -08:00
Toshio Kuratomi
3bf0a50716 Clarify docker SDK rather than docker API 2018-03-06 09:01:15 -08:00
Toshio Kuratomi
87c11663c1 Add docker 3 API fixes to the changelog 2018-03-06 07:01:35 -08:00
skylerbunny
d6f150cbb8 Add compatibility for docker-py version 3 (#36973)
(cherry picked from commit d984afa5ba)
2018-03-06 06:58:09 -08:00
Toshio Kuratomi
612b99a217 Add py3 znode and maven_artifact fixes to the changelog 2018-03-05 18:50:23 -08:00
Toshio Kuratomi
e0bc936b56 Python3 issues in maven_artifact (#37035)
Fixes #33761

(cherry picked from commit 1bc860fafd)
2018-03-05 18:49:48 -08:00
Grigory Starinkin
98b5ffec04 fix python3 compatibility for znode module
kazoo client requires bytes and not string

(cherry picked from commit 2d98a2de68)
2018-03-05 13:02:40 -08:00
David Newswanger
5911ee813a fix python 3 dictionary issue 2018-03-05 09:07:27 -08:00
Toshio Kuratomi
5328bfd99b New release v2.4.4-0.2.rc1 2018-03-01 13:50:04 -08:00
Sam Doran
47eccd366b
Cherry pick Tower credential fixes to stable-2.4 (#36807)
* Fix credentials for Tower API V2

(cherry picked from commit 640749d54f)

* tower cred: implement credential /api/v1/ kind compatability

(cherry picked from commit 9cb4b70e27)

* tower cred: filter user name lookup by the proper key

(cherry picked from commit cd6855275e)

* tower cred: update kind options in documentation

(cherry picked from commit 8a41233202)

* tower cred: support credential kind/type for /api/v1/ and /api/v2/ (#36662)

older versions of Tower (3.1) don't have a concept of CredentialTypes
(this was introduced in Tower 3.2).  This change detects older versions
of pre-3.2 tower-cli that *only* support the deprecated `kind`
attribute.

(cherry picked from commit 641f8b4ef6)

* Add CHANGELOG entry for Ansible Tower module credential fix

* properly detect the absence of credential_type in older tower-cli (#36908)

(cherry picked from commit a82043939b)

* Do not import HAS_TOWER_CLI since it does not exist in stable-2.4

* properly pass /api/v1/ credential fields for older Towers (#36917)

(cherry picked from commit 0e7106b106)
2018-03-01 15:54:15 -05:00
Brian Coca
0d57282a1a remove extra fields from debug output
fixes #35493

updated tests

(cherry picked from commit a79378fccb)
2018-03-01 12:06:40 -05:00
Brian Coca
4546e7d1d7 fix loop_control templating (#36124)
* fix loop_control templating

- properly template ALL properites for loop_control
- loop_control inherits from base, it should not, but needs validate/attribute functionality

fixes #24719

(cherry picked from commit 8de4f7cd9f)
2018-03-01 11:53:19 -05:00
Toshio Kuratomi
990254efb1 Add protection for inventory plugins using verify incorrectly to changelog 2018-02-28 19:07:19 -08:00
Brian Coca
18359b0cec protect against plugins using verify incorrectly
assume false on any errors

(cherry picked from commit ef40e5e3b2)
2018-02-28 19:06:27 -08:00
Trishna Guha
92cea82a4e
vyos_l3_interface fix (#36721)
* vyos_l3_interface fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* update test and changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-27 08:52:37 +05:30
Matt Clay
2d05ecb26c Temporarily disable subversion test on osx.
(cherry picked from commit f283edcb19)
2018-02-26 13:26:35 -08:00
Matt Clay
1f43d5fc75 Fix rst link syntax. 2018-02-26 11:31:55 -08:00
Matt Clay
29e7d5ecd9 Fix unclosed anchor in changelog. 2018-02-26 10:08:10 -08:00
Matt Martz
668a17cfba
Backport #36602 for stable-2.4 (#36607)
* Start of tests for modify_module, specifically to ensure proper shebang replacement on old style modules (#36602)

(cherry picked from commit a7062b7587)

* Modify test to work on 2.4 due to lacking templar kwarg
2018-02-22 17:52:47 -06:00
Deepak Agrawal
3b0686ffe8
vyos_config IndexError in sanitize_config (#36375) (#36566)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case

(cherry picked from commit 0bbea9a579)
2018-02-22 20:20:49 +05:30
Toshio Kuratomi
52c85f6c66 New release v2.4.4-0.1.beta1 2018-02-21 20:29:49 -08:00
Toshio Kuratomi
fe7e44a5d7 Add python3 ansible_*_interpreter fix to the changelog 2018-02-21 18:09:22 -08:00
Matt Martz
a8582663b1 Fix types when evaluating interpreter (#36541)
* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)

(cherry picked from commit a4df4d33ac)
2018-02-21 18:09:16 -08:00
Sam Doran
23289bd2f2 Check for regexp match when using insertbefore or insertafter (#36474)
Add tests to cover this scenario
Fixes #36156

(cherry picked from commit 723daf3e3a)

# Conflicts:
#	lib/ansible/modules/files/lineinfile.py
2018-02-21 17:06:27 -05:00
Sam Doran
0231cd9c93 Add note to use script module rather than inline here documents (#32863)
* Add example on how to use a here document with shell module

* Remove here doc example and add note to use script module instead

(cherry picked from commit 5e7ee9df0a)
2018-02-21 15:09:18 -05:00
Matt Martz
4e4cd7ee67
cherry-pick #36470 for 2.4 (#36526)
* Re-use logic from StrategyBase._load_included_file in StrategyModule.run for free and linear (#36470)

This improves include_role performance and recursion limits

(cherry picked from commit 10fefc7156)

* Add changelog for 36470
2018-02-21 11:30:21 -06:00
Abhijeet Kasurde
101578b63f
VMware: set extra configs for virtual machine (#36521)
This fixes implementation of extra config for virtual machine.

Fixes: #32004

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 80fb836ce5)
2018-02-21 21:44:44 +05:30
Jordan Borean
a3e02a2417
fetch: changed docs around behaviour for default fail_on_missing 2018-02-21 18:14:27 +10:00
Sam Doran
8b6184472b Update CHANGELOG 2018-02-20 20:01:22 -05:00
Sam Doran
6598c8e361
Always show prompt, even if seconds or minutes are specified (#36258)
Fixes #36057
2018-02-20 19:57:11 -05:00
Jordan Borean
55f903eafd
winrm: Fix kerberos auth encoding for Python 3 (#36465) 2018-02-21 08:43:02 +10:00
Toshio Kuratomi
f3a395b783 Add deb packaging fix for ubuntu12.04 to changelog 2018-02-19 13:41:04 -08:00
Grant Slater
858a1f802f Use pycrypto backend, rather than python-cryptography, on Ubuntu Precise
(cherry picked from commit e3192fb3a4)
2018-02-19 13:40:27 -08:00
David Newswanger
a98700917f added support for --testcase flag in ansible-test (#36134)
* added support for --testcase flag in ansible-test

* fixed command format

* added tab completion

* fixed sanity issues

* added documenation for --testcase

* don't autocomplete when multiple modules are selected

(cherry picked from commit 3f5caf659e)
2018-02-19 09:01:38 -08:00
Toshio Kuratomi
4a08e07da0 Add changelog entries for some more 2.4.4 fixes 2018-02-15 14:28:09 -08:00
Adam Miller
1ab84b1cfd fix new EC2 C5 instance virtualization_type identification (#35063)
* fix new EC2 C5 instance virtualization_type identification

Fixes #35051

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

(cherry picked from commit f95adcce8e)
2018-02-15 14:23:37 -08:00