Commit graph

40107 commits

Author SHA1 Message Date
Sam Doran
afb2e9d029 Add setup roles for passlib and pexpect for use with pause and vars_prompt tests (#43613)
* Add passlib to RHEL test instance

This looks like the only tests instance that is missing this libary. It is needed for vars_prompt tests.

* Create setup roles for pexect and passlib

Switch to using aliases rather than installing directly in the test scripts

(cherry picked from commit 96c2375692)
2018-12-06 09:40:14 -08:00
Jordan Borean
af03dd0463 create local subversion server for tests (#49047)
* create local subversion server for tests

* fix sanity issues

* don't touch system config when bringing up site

* removed original setup files

* fix opensuse config

(cherry picked from commit 0420d606de)
2018-12-06 09:40:14 -08:00
Josue David Hernandez
35e02293d5 Adding support for clearlinux showing release nuber (#47101)
Signed-off-by: Josue David Hernandez <josue.d.hernandez.gutierrez@intel.com>
(cherry picked from commit 8880c72682)
2018-12-06 09:39:12 -08:00
Matt Martz
acdd4cbfcd [stable-2.7] Support version 3 of the redis python library (#49445)
* Support version 3 of the redis python library. Fixes #49341

* Document 2.4.5 minimum redis-py version
(cherry picked from commit 77de219)

Co-authored-by: Matt Martz <matt@sivel.net>
2018-12-06 09:36:00 -08:00
Josue David Hernandez
1af07cc38f Fix for changes in clearlinux (#49344)
* Fix for changes in clearlinux

clearlinux is now providing /etc/os-release file and ansible is identifying as NA
then this change allow ansible to find it

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add changelog fragment for clearlinux changes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
(cherry picked from commit 6d42c5020a)
2018-12-06 09:34:20 -08:00
Abhijeet Kasurde
e0f910abcb Handle special service where package is not available (#45155)
There are several services e.g. vmware-fdm, which does not have package name and
package description which will raise a error if queried for.

(cherry picked from commit b3b65d16b8)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-05 10:40:55 -08:00
Yuwei Zhou
bc80087cca azure_rm_image: fix creation of image with data disks (#49394) (#49518)
* azure_rm_image: fix creation of image with data disks (#49394)

(cherry picked from commit 79c0e30c5a)

* Create 49394_azure_image.yml
2018-12-05 10:40:19 -08:00
mattandes
9cc7f7bcf2 Fix win_nssm credentials quoting (#48761)
* Fix win_nssm credentials quoting

Fix credential quoting for win_nssm after changes to the way nssm command is invoked in Ansible 2.7.1.

* Updating nssm command to update credentials to use Argv-ToString to properly escape password variable.

* Adding changelog fragment for fix of #48728.

(cherry picked from commit 15c5dbcc20)
2018-12-05 10:35:59 -08:00
Sam Doran
91b2347344 [stable-2.7] Use IndexError in exception (#49488)
(cherry picked from commit 6200d32c0d)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2018-12-05 10:34:28 -08:00
Peter Sprygada
799f8e97b3 fixes an issue with dict_merge in network utils (#41107)
This change address a problem where the dict_merge function would fail
due to the value being a nested dict.  This will now recursively pass
the value back through the dict_merge function.
Merge to devel https://github.com/ansible/ansible/pull/41107

(cherry picked from commit 2a4be2748f)

Update changelog

Fix review comments
2018-12-05 10:32:15 -08:00
Sam Doran
a928ea4d93 [stable-2.7] Reboot - Fix errors when using Paramiko connection (#49002)
Different connection plugins return different data when throwing exceptions. The Paramiko connection plugin does not return a text sting, which caused an exception.

The ssh connection plugin returns multi-line errors, which makes the debug logs harder to read. Only return the last line in that case in order to make the logs more readable.

When experiencing a connection failure, reset the connection.

Add reset() to paramiko_ssh

Indicate thet conection state is False when running close(). This is needed by the ensure_connected() decorator to work properly.

Co-authored-by: Matt Martz <matt@sivel.net>
(cherry picked from commit 5eb7f5781e)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2018-12-04 10:10:23 -08:00
Abhijeet Kasurde
35d84ccc3a VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 1b04571ea0)
2018-12-04 07:32:06 -08:00
Xaroth
99612b8224 [stable-2.7] -Fix: The Ubuntu 14.04 image on Shippable runs an old version of python, causing issues with checking out bitbucket, adjust tests to compensate. (#49433)
-Add: Mention bitbucket dropping TLSv1 and TLSv1.1 support as per 01 Dec 2018, potentially causing issues with older clients.
(cherry picked from commit a6db7f7abd)

Co-authored-by: Xaroth <xaroth+github@xaroth.nl>
2018-12-04 07:08:30 -08:00
Vinay Dandekar
aed38b12cd [aws] Revert back to getting the AWS role name from the URI (#49427)
* Revert back to getting the AWS role name from the URI with a small change (#49113)

- The role name and instance profile name _can_ be different
- Change the delimiter to `:` for keys that are discovered through the JSON parsing (which is not a valid delimiter for AWS IAM role names), this delimiter is still converted to underscore
- Now checks for the existence of that delimiter to remove the cases where the JSON keys are appended to the role name to find the role name

(cherry picked from commit ff9b86f560)

* Changelog update
2018-12-04 07:02:00 -08:00
Corey Wanless
949b8e991e [Backport 2.7] sets admin_password to no_log in na_ontap_cifs_server (#49412)
* sets admin_password to no_log

(cherry picked from commit 1d321cef6e)

* adds change log for ontap cifs server no_log
2018-12-04 07:00:33 -08:00
John R Barker
69e1d0f425 Backport/2.7/48933 (#49400)
* comparing StorageConnection.password breaks idempotency (#48933)

(cherry picked from commit 5cd31578cc)

* changelog
2018-12-04 06:59:10 -08:00
Adam Miller
12e088ff93 dnf module load/init dnf pkg mgr plugins properly (#49278)
* dnf module load/init dnf pkg mgr plugins properly

Fixes #45940

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 378cc9668c)
2018-12-03 18:41:24 -08:00
Pilou
2aa0f366d2 templar: ensure that exceptions are handled, fix 'AttributeError' (#48792)
* templar: ensure that exceptions are handled

* Fix AttributeError: object has no attribute 'message'

'message' attribute is deprecated since Python 2.6 and not available
with Python 3.

Simple reproducer:

    - hosts: localhost
      vars:
        not_json: "{{ 'test str' | from_json }}"
      tasks:
        - command: "echo {{ not_json }}"

(cherry picked from commit 62c05033d6)
2018-12-03 18:40:42 -08:00
joaocpinto
91d3857c36 Cast int for expire field to avoid call failure to sensu API (#33239)
(cherry picked from commit bbab4c1b49)

* Cast int for expire field to avoid call failure to sensu API (#33239)

* Add changelog
2018-12-03 18:36:32 -08:00
Dusan Matejka
f017c3fa8d added changelog fragment 2018-12-03 18:35:30 -08:00
Dusan Matejka
6ba6627338 Fixed support for LLD type user macros and added missing validate_certs attribute
(cherry picked from commit 7af8c0e07e)
2018-12-03 18:35:30 -08:00
Felix Fontein
35fd7394b3 Add changelog. 2018-12-03 17:05:57 -08:00
Felix Fontein
0ae615de98 ACME: fix bug introduced in #49266, work around problem with Pebble (#49407)
(cherry picked from commit 34c57b4c42)
2018-12-03 17:05:57 -08:00
Felix Fontein
1deb2300a4 ACME: improve error handling (#49266)
* Improve error handling: when parse_json_result is False, still return the error message.

* Remove content body from info dict.

* Add changelog.

(cherry picked from commit b842b1b97e)
2018-12-03 17:05:57 -08:00
Sam Doran
832aa98ace [stable-2.7] Improve log message in paramiko_ssh connection plugin (#49004) (#49318)
* [stable-2.7] Improve log message (#49004)

This is the only connection plugin that doesn't state explicitly what it is in the log.
(cherry picked from commit 8f9ced4005)

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

* Add changelog
2018-12-03 17:02:43 -08:00
Ganesh Nalawade
47e0d29a59 Fix iosxr netconf plugin response namespace (#49238)
* Fix iosxr netconf plugin response namespace

*  iosxr netconf plugin removes namespace by default
   for all the responses as parsing of xml is easier
   without namepsace in iosxr module. However to validate
   the response received from device against yang model requires
   namespace to be present in resposne.
*  Add a parameter in iosxr netconf plugin to control if namespace
   should be removed from response or not.

* Fix CI issues

* Fix review comment

(cherry picked from commit 829fc0feda)
2018-12-03 16:44:17 -08:00
AlanCoding
fb39299578 Fix error where pod has error and no containers
(cherry picked from commit 865430e3e0)
2018-12-03 16:43:36 -08:00
AlanCoding
aa1b00f7e9 k8s/oc plugins: fix 'ResourceField' is not JSON serializable (#46145)
Fixes #44408

(cherry picked from commit 15d46ce428)
2018-12-03 16:43:36 -08:00
Trishna Guha
6ba1330191 changelog
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-12-03 16:40:41 -08:00
Paul Neumann
66dd6035e0 nxos_facts: Do not gather redundant neighbor data (#49024)
* nxos_facts: Remove dead code

The commit e51964e made this redundant as the structured case is handled
elsewhere.

* nxos_facts: Do not gather neighbors redundantly

LLDP reports the neighbor using the abbreviated interface name, whereas
CDP reports the neighbor using the full interface name. Normalize the
local interface name in the LLDP case, so there is no redundant
information. Due to the order of the gathering, CDP neighbors are saved
in case both LLDP and CDP data is available on a certain interface.

(cherry picked from commit 2019f0e430)
2018-12-03 16:40:41 -08:00
Mike Wiebe
d1a38f1f72 Fix issues with nxos_os_install module (#48811)
* Use expect module to copy files

* Remove old and redundant upgrade files

* Return error message instead of code

* Cleanup copy command code

* Fix force issue in nxos_install_os

* new nxos_install_os integration tests

* Uncomment transport tests

* Revert negative test change

* Remove combined option that is no longer required

* Make shippable happy

* Add n5k test files

(cherry picked from commit a721572206)
2018-12-03 16:40:41 -08:00
Mike Wiebe
faa5a73c73 Fix n3k power supply facts (#49150)
(cherry picked from commit af1e6878e9)
2018-12-03 16:40:41 -08:00
Steve Dodd
8f9eecd66d Fix LLDP to use json (#48318)
(cherry picked from commit e51964e7a6)
2018-12-03 16:40:41 -08:00
Trishna Guha
d058e032fa do not override lldp neighbors nxos_facts (#48087)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 27075ab7dd)
2018-12-03 16:40:41 -08:00
Trishna Guha
029880a016 nxos_facts fix NameError (#48981)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8796085569)
2018-12-03 16:40:41 -08:00
Olivier BLIN
d0416733a9 Fix nxos modules idempotence issue (#46437)
* nxos_interface vlan and port-channel idempotence fix for mtu

* Fix MTU reconfiguration at each execution

* nxos_interface port-channel idempotence fix for mode (#44248)

* Fix trunk mode idempotence for port-channel
* Gather ethernet and port-channel code for mode management

* nxos_linkagg port-channel idempotence fix for channel-group's mode

The regex to retrieve channel-group's mode is not enough accurate.
Therefore, the swhitchport mode  was matched instead of the
channel-group's mode.

* This fix add accuracy to match the right configuration command

* Add support for switchport mode dot1q-tunnel in nxos_interface

* Fix layer reconfiguration at each execution

(cherry picked from commit c51407c806)
2018-12-03 16:40:41 -08:00
Adam Miller
eafc7fc531 require git when trying to use it in ansible-galaxy cli (#49212)
* require git when trying to use it in ansible-galaxy cli

Previously we weren't setting `required=True` when calling
`get_bin_path` and the path would return `None`, this would cause
a traceback when attempting to ' '.join() to create a string
representation of the failed command for error output

Fixes #49200

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

* add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>
(cherry picked from commit 81540bd754)
2018-12-03 16:39:34 -08:00
Abhijeet Kasurde
6dba96c8cc Added changelog after review 2018-12-03 16:38:55 -08:00
Anil Kumar Muraleedharan
bbb47eedc0 Backport/2.7/46623 (#48154)
* To backport PR 46623 to 2.7.2

* Lenovo finetune modules (#46623)

* Making username password etc non mandatory as we use persistence connection.
Some documentation fine tuning also done.

* To update version which was tested against.

* Adding Bacon switch (NE0152T) to device rules

* Qalthos Review catch

* Updating version

* Changing documentation to add Bacon switch. This is effective since 2.8

(cherry picked from commit d0e89bc1bb)

* Delete cnos-46623-support-bacon-in-modules.yaml

* Update cnos_devicerules.py

* Update cnos.py

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2018-12-03 16:37:25 -08:00
Martin Krizek
5340549506 Warn about falling back to jinja2_native=false (#49063)
(cherry picked from commit abdf46803b)
2018-12-03 16:36:00 -08:00
Martin Krizek
660f46be13 Fix using vault encrypted data with jinja2_native (#49025)
Fixes #48950

(cherry picked from commit d4568d97d4)
2018-12-03 16:35:01 -08:00
Jordan Borean
4b3244427e ansible-test: recursively scan setup dependencies (#49170)
* ansible-test: recursively scan setup dependencies

* removed need for default set()

(cherry picked from commit 694c505452)
2018-12-03 16:33:00 -08:00
Matt Clay
1986e9ed89 Fix lookup_passwordstore test skipping. (#49178)
* Fix lookup_passwordstore test skipping.

Skip all of RHEL instead of specific versions.
Skip all of CentOS < 7 instead of specific versions.

This makes the test more robust when testing newer versions.

Tests could be executed on RHEL if EPEL was installed during the test.
(cherry picked from commit 704dae2cda)
2018-12-03 15:42:03 -08:00
Matt Clay
34be89d8ce Fix ansible-test skip warning message.
(cherry picked from commit 3b705efc93)
2018-12-03 15:42:03 -08:00
Matt Clay
19ba752b56 Add --raw option to ansible-test shell command.
It is currently supported only with the `--remote` option.

This makes it easier to troubleshoot new instances which are not
yet supported by the setup scripts used by ansible-test.

(cherry picked from commit 0826a00803)
2018-12-03 15:42:03 -08:00
Matt Clay
7a0e86551d Support skip of platforms by version in tests. (#48826)
* Support skip of platforms by version in tests.

Previously a remote platform could be skipped completely using the alias:

`skip/{platform}` such as `skip/rhel`

Now a specific platform version can be skipped using the alias:

`skip/{platform}{version}` such as `skip/rhel7.6`

This feature is available for platforms specified with the `--remote` option.

* Add skip by version to the docs.

(cherry picked from commit 8066acc90c)
2018-12-03 15:42:03 -08:00
Matt Clay
0b410dc296 Remove CI platform: freebsd/10.4
(cherry picked from commit e6ffc4f89a)
2018-12-03 15:42:03 -08:00
Matt Clay
317cc2c757 Switch tests from RHEL 7.5 to 7.6.
(cherry picked from commit 6745ee7cc8)
2018-12-03 15:42:03 -08:00
Tim Rupp
65a9369f68 Adds hasattr checks for rpc calls used in network_cli plugins (#49173)
Network platforms that don't have cliconf plugin will fail when
sending rpc calls for the reset_history and disable_response_logging
functions because those are defined in cliconf exclusively at this
time.

This patch adds checks for those attributes before making the call

(cherry picked from commit 0b5b5e69d8)
2018-12-03 14:33:36 -08:00
Jonathan Hanson
ba45d8a248 Fix type in ansible-galaxy info output (#49096)
Changed from 'intalled_version' to 'installed_version'

(cherry picked from commit 12a573a7db)
2018-12-03 14:32:40 -08:00