Commit graph

154 commits

Author SHA1 Message Date
Nilashish Chakraborty
02ef320c24 Fix ios_l2_interface vlan bug CP in 2.6 (#44445)
* FIX ISSUE:#43878 when the vlans string have a final comma. (#43879)

(cherry picked from commit 401c45384e)

* Added changelog
2018-08-21 08:28:08 -07:00
Nilashish Chakraborty
1bcc192580 Fix ios_vlan and ios_l2_interface issues in 2.6 (#44250)
* Fixes ios_l2_interface and ios_vlan not working on certain interface types issue (#43819)

* Fixes #43654 and #43582

* Remove q statement

* Fix shippable errors

* Fix more shippable errors

* Fix unittest

(cherry picked from commit b14f256d41)

* Added Change Logs

* Fixed changelog entry

* Fixed changelog entry - 2
2018-08-21 08:27:33 -07:00
Matt Clay
8a6ebd1e8d New release v2.6.3 2018-08-16 17:47:36 -07:00
Étienne BERSAC
d5e278e471 Fix typos in 2.6 changelog (#44076)
* Fix markdownism in changelog

* Fix typo in vmware remove vm scenario changelog entry
2018-08-14 07:50:06 -07:00
Toshio Kuratomi
dabd81deba [stable-2.6] Only print warning when ansible.cfg is actually skipped (#43583)
Only print warning when ansible.cfg is actually skipped

* Also add unittests for the find_ini_config_file function
* Add documentation on world writable current working directory
  config files can no longer be loaded from a world writable current
  working directory but the end user is allowed to specify that
  explicitly.  Give appropriate warnings and information on how.

Fixes #42388
(cherry picked from commit 30662bedad)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-08-13 15:26:52 -07:00
Yuwei Zhou
d49240a619 Azure module bugfix backport (#43808)
* Fix nsg cannot add rule with  purge_rules false (#43699)

(cherry picked from commit 88a738b0ba)

* Create azure_securitygroup_fix_adding_rule.yaml

* azure_rm_loadbalancer_facts.py: list() takes at least 2 arguments fix (#29046) (#29050)

(cherry picked from commit d1d08304f9)

* azure_rm_deployment: collect tags from existing Resource Group (#26104)

(cherry picked from commit 6741e98c04)

* add change log
2018-08-13 15:22:00 -07:00
Matt Martz
1b2c691980 [2.6] Fix invocation output. Fixes #43447 (#43542) (#43646)
* [2.6] Fix invocation output. Fixes #43447 (#43542)
(cherry picked from commit 4094b01)

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

* Add changelog for #43542
2018-08-13 14:21:33 -07:00
Yanis Guenane
1b2d7571a7 Backport/2.6/40872 (#43396)
* Convert valid_date to bytes for conversion (#40872)

Fixes: #40523

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

* 40872: Add fragment changelog
2018-08-13 13:35:49 -07:00
Jiri Tyr
7e835bf60a Fix for creation and removal of swap record in fstab (fixes #42706, #31437 and #30090) (#42837) 2018-08-13 13:34:26 -07:00
Brian Coca
c687b1b874 nicer error message on multiprocessing fail
fixes #43090

(cherry picked from commit 21fc6a0c38)
2018-08-13 13:31:16 -07:00
Shuang Wang
f33ec9fc0a fix issue [ get_url does not change mode when checksum matches ] (#43342)
* fix  #29614

* add change log for #43342

* Cleanup tests and add tests for this scenario


Co-authored-by: ptux
(cherry picked from commit 68683b4c73)
2018-08-13 13:30:09 -07:00
Aurélien Grimal
41b88cc279 Fix bug #32437 (#38166)
(cherry picked from commit 71952a0aad)
2018-08-13 13:27:39 -07:00
Abhijeet Kasurde
bc3db437e8 VMware: handle pnic in proxyswitch
Fixes: #42943

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

(cherry picked from commit f2640d3394)
2018-08-13 13:26:12 -07:00
Jordan Borean
53a96e36b9 win_domain modules: ensure Netlogon service is still running after promotion (#43703)
(cherry picked from commit 7b1cc11685)
2018-08-13 13:22:00 -07:00
Toshio Kuratomi
a0061e72fa [stable-2.6] Fix the local and ssh plugins for a cornercase retrying a syscall
The bundled selectors library which is used by the local and ssh
connection plugins had a bug which caused a traceback in a cornercase.
If selectors were in use and a syscall was interrupted, selectors would
attempt to restart the syscall after the interrupt was processed.  if
the attempt determined that the timeout for running the syscall had
already expired, the code attempted to raise OSError.  The raise was
using a Python3-ism and needed to be ported to work on Python2.

Fixes #41630
(cherry picked from commit e2e44f8)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-08-13 13:19:53 -07:00
Sam Doran
4cbf048996 Only template values in vars_prompt rather than all vars (#39304)
This allows the use of variables in vars_prompt fields but allows variables entered in the prompt to affect play vars rather than throwing an undefined error.

Add tests for vars_prompt

(cherry picked from commit 6d38167d49)
2018-08-13 13:18:30 -07:00
Sumit Jaiswal
3caa736403 Resolves bug where existing host_record was deleted when existing record name is used with different IP (#44088)
* Resolves bug where existing host_record was deleted when existing record name is used with different IP (#43235)

* resolves bug 42937

* resolves integration test failure

* resolves integration test failure

* resolves integration test failure

(cherry picked from commit fd4e774cec)

* changelogs
2018-08-13 13:17:17 -07:00
Deepak Agrawal
9794e5b610 openvswitch_db : Handle column value conversion and idempotency in no_key case (#43914)
* openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869)

* change column value to string. handle idempotency in no key case

* fix unit test failures in baseline

(cherry picked from commit 8eaebf86b6)

* change column value to string. handle idempotency in no key case
2018-08-10 17:07:01 -07:00
Pilou
516ed4d7bc [stable-2.6] Fix 2 issues in sysvinit module (backport/2.6/42786) (#43831)
* Fix 2 issues in sysvinit module (#42786)

* Do not compare result to unset parameter in sysvinit module

* Fix misformed command in sysvinit module

* Small None-comparison style fix in sysvinit module

(cherry picked from commit f26272a492)

* Update changelog
2018-08-08 09:53:28 -07:00
John R Barker
fc21507a30 Update openstack inventory script to keep basic functionality Backport/2.6/43432 (#43465)
* Update openstack inventory script to keep basic functionality (#43432)

re-applies commit 6667ec4474 which
fixed the plugin to the script so that it will work with current
ansible-inventory.

Also redirect stdout before dumping the ouptput, because not doing
so will cause JSON parse errors in some cases.
(cherry picked from commit fa45c44026)

* fixed the plugin to the script so that it will work with current
2018-07-31 08:28:28 -07:00
Matt Clay
c997811f45 New release v2.6.2 2018-07-27 16:18:51 -07:00
Ganesh Nalawade
aee1d42fe7 Correcting conditionals looping (#43331) (#43346)
* Correcting conditionals looping (#43331)

Empty conditionals would not break out of the loop, causing every command to be run for the same number of times as retries is defined (10 by default)

(cherry picked from commit e215f842ba)

* Update changelog
2018-07-27 08:06:15 -07:00
Brian Coca
460183ce47 Error on empty group/host name (#42584)
* error on false host/group name

(cherry picked from commit 12a8363fae)
2018-07-27 08:03:14 -07:00
Artem Goncharov
0aa5d8ed45 fixes #42042
do not create group with region name if it is not given
Backport https://github.com/ansible/ansible/pull/42939

(cherry picked from commit d3f53b4b9f6167c359dae1069cb71eb10d00afc0)
2018-07-27 08:02:25 -07:00
Toshio Kuratomi
b0a4627975 [stable-2.6] ensure 'text' source assumptions (#42522) (#43341)
* [stable-2.6] ensure 'text' source assumptions (#42522)

* ensure 'text' source assumptions.
(cherry picked from commit 937e710485)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>

* Remove piece of bugfix that depends on newer feature
2018-07-26 21:54:08 -07:00
Matt Clay
bc49055f28 Revert "[stable-2.6] ensure 'text' source assumptions (#42522)"
This reverts commit c0e7f890fb.
2018-07-26 20:15:12 -07:00
Trishna Guha
171c6fcf4d nxos_facts module and nxos cliconf fix stable-2.6 (#43180)
* Refactor nxos cliconf get_device_info and add requirements for JSON structured output support in nxos_facts module (#42089)

* nxos_facts requires JSON structured output support

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

* refactor get_device_info for legacy devices

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

* update additional logic

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 0e05425b32)

* fix regex cliconf nxos (#42288)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit df8ad8ebf9)

* get_device_info nxos zero or more whitespace regex (#43178)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit dd6ef3355f)

* warning message improved (#42969)

(cherry picked from commit bea8e0200c)

* Add text output along with structured output in nxos_facts (#42886)

* nxos_facts to use default output instead of structured output

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

* fix shippable error

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

* nxos_facts refactor

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

* Add structured output back

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 1d5f881f5c)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-26 17:48:16 -07:00
Sam Doran
2267ba2f05 Only report change when home directory is different on FreeBSD (#42865)
* Only report change when home directory is different

Add tests with home: parameter

Have to skip macOS for now since there is a bug when specifying the home directory path for an existing user that results in a module failure. That needs to be fixed in a separate PR.

(cherry picked from commit 0ca61e9d87)
2018-07-26 17:41:59 -07:00
Hossein Zolfi
e288c23a18 Fix example of nmap plugin (#42925)
(cherry picked from commit e756ef8265)
2018-07-26 17:41:05 -07:00
Brian Coca
c622cc6509 better error messasge (#42770)
* better error messasge

(cherry picked from commit 9217fbb7dd)
2018-07-26 17:36:04 -07:00
Brian Coca
26e3f61dbf remove dupe entries
(cherry picked from commit 18aa87803f)
2018-07-26 17:35:13 -07:00
Alexander Gubin
49d81006df sysvinit: Fix for false changed messages (#42956)
(cherry picked from commit e129616ba6)
2018-07-26 17:33:02 -07:00
Jordan Borean
3e9a390809 win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* win_user: use different method to validate credentials that does not rely on SMB/RPC

* Use Add-Type as SetLastError on .net reflection not working on 2012 R2

(cherry picked from commit 04431216e7)
2018-07-26 17:27:28 -07:00
Thierry Bouvet
e0bb304f85 Fix ssl_version default value. (#42955) 2018-07-26 17:23:50 -07:00
Brian Coca
c0e7f890fb [stable-2.6] ensure 'text' source assumptions (#42522)
* ensure 'text' source assumptions.
(cherry picked from commit 937e710485)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-26 17:21:35 -07:00
Yanis Guenane
26be841b23 vultr.py: fix env var handling (#42659) 2018-07-17 16:52:59 -07:00
Abhijeet Kasurde
498aca834e VMware: Remove VM using vmware_guest (#42100)
This adds scenario guide for removing VM using vmware_guest module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 6339e37abd)
2018-07-16 18:04:26 -07:00
Sam Doran
31a425d26c Fix pause module so it does not stack trace when redirecting stdout. (#42217)
* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY

(cherry picked from commit 1d1595b990)
2018-07-16 18:03:18 -07:00
Jordan Borean
69a36a3fa7 Fix remote_tmp when become with non admin user (#42396)
* Fix tmpdir on non root become

 - also avoid exception if tmpdir and remote_tmp are None
 - give 'None' on deescalation so tempfile will fallback to it's default behaviour
   and use system dirs
 - fix issue with bad tempdir (not existing/not createable/not writeable)
   i.e nobody and ~/.ansible/tmp
 - added tests for blockfile case

* Revert "Temporarily revert c119d54"

This reverts commit 5c614a59a6.

* changes based on PR feedback and changelog fragment

* changes based on the review

* Fix tmpdir when makedirs failed so we just use the system tmp

* Let missing remote_tmp fail

If remote_tmp is missing then there's something more basic wrong in the
communication from the controller to the module-side.  It's better to
be alerted in this case than to silently ignore it.

jborean and I have independently checked what happens if the user sets
ansible_remote_tmp to empty string and !!null and both cases work fine.
(null is turned into a default value controller-side.  empty string
triggers the warning because it is probably not a directory that the
become user is able to use).

(cherry picked from commit 8bdd04c147)
2018-07-16 17:53:06 -07:00
Jakub Libosvar
c3f2e4679c openvswitch_db: Make 'key' parameter optional (#42110)
The OVSDB schema consists of typed columns. The 'key' parameter is
required only for columns with type of a 'map'. This patch makes 'key'
an optional parameter to allow setting values for other column types
like int.

Fixes #42108

(cherry picked from commit 26b0908270)
2018-07-16 17:49:54 -07:00
Matt Martz
11d2d3da55 Make sure we are comparing bytes extensions in inventory plugins (#42475)
* Ensure we are comparing text paths with extensions. Fixes #42118

* Add changelog

(cherry picked from commit abb05c98f3)
2018-07-16 17:48:57 -07:00
René Moser
e4e0433d2f [2.6] Fix docker container init check requirements (#42533)
* docker_container: fix init check requirements (#40839)

* docker_container: ensure 'init' is supported

Check docker-py version too.

Move API version check in docker_container module since 'init' module
parameter isn't defined by other docker modules.

docker-py supports 'init' since 2.2.0:
https://github.com/docker/docker-py/blob/2.2.0/docs/change-log.md

* docker_container: fix compat with docker-py<2.2

Exception was:
TypeError: create_host_config() got an unexpected keyword argument 'init'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):
                        File ansible_module_docker_container.py, line 2089, in <module>
                          main()
                        File ansible_module_docker_container.py, line 2084, in main
                          cm = ContainerManager(client)
                        File ansible_module_docker_container.py, line 1704, in __init__
                            self.present(state)
                        File ansible_module_docker_container.py, line 1724, in present
                            new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)
                        File ansible_module_docker_container.py, line 826, in create_parameters
                            host_config=self._host_config(),
                        File ansible_module_docker_container.py, line 932, in _host_config
                            return self.client.create_host_config(**params)
                        File lib/python3.6/site-packages/docker/api/container.py, line 157, in create_host_config
                            return utils.create_host_config(*args, **kwargs)
                      TypeError: create_host_config() got an unexpected keyword argument 'init'",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 1
}

(cherry picked from commit 3301a0b530)

* add changelog fragment
2018-07-16 17:47:21 -07:00
Jordan Borean
f3570c2b0c win_reboot: fix 2.6 issues and better handle post reboot reboot (#42330)
* win_reboot: fix 2.6 issues and better handle post reboot reboot

* changed winrm _reset to reset

* Add handler to reset calls when .reset() throws an AnsibleError on older hosts

* Moving back to _reset to get the issue fixed

(cherry picked from commit 940d4a0e89)
2018-07-16 17:42:55 -07:00
Matt Davis
f126eddff1 return wu result from inner job (#42647)
fixes #42423

(cherry picked from commit a5fc9a17f0)
2018-07-16 17:42:07 -07:00
Jordan Borean
b9bff5e39a win_chocolatey: add TLSv1.2 support for install phase (#41992)
(cherry picked from commit e3521776f5)
2018-07-16 17:40:18 -07:00
Trishna Guha
26f8b67fbd nxos bugfix cherry-pick 2.6 (#42724)
* Add get_capabilities in nxapi module_utils (#42688)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit d5e9653c96)

* add changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-07-16 17:39:27 -07:00
jamessemai
9e706a3ed4 win_security_policy: Allow setting a value to empty (#42051)
* win_security_policy: allow removing values (resolves #40869)

* Removing warning

* Adding test for remove policy setting

* Fixing string comparison

* Make idempotent

* Adding idempotency and diff test

* added changelog fragment

(cherry picked from commit dc32842573)
2018-07-16 17:37:59 -07:00
Jordan Borean
e3a0431c77 Cmdlets output handling 2.6 (#42721)
* fix win_unzip and win_share Powershell cmdlets output invalid JSONs (#42713)


(cherry picked from commit b2527c55c3)

* Added changelog fragment
2018-07-16 17:37:01 -07:00
Sloane Hertel
c40b85d01f Backport pagination fix for cloudfront_facts (#42746)
* Fix #38038 cloudfront_facts module returns only first page of response (#38045)

(cherry picked from commit 12057de1c6)

* changelog
2018-07-16 17:26:48 -07:00
Dennis Conrad
f5053506d9 Fixes #42734 - typo in update-rc.d detection
(cherry picked from commit f0463befc7)
2018-07-16 17:25:50 -07:00