Commit graph

29612 commits

Author SHA1 Message Date
Toshio Kuratomi
af018b75f0 Add integration test that modules are loaded from the expected locations (#24170)
* Add integration test that modules are loaded from the expected locations
* Fix ping module to pass PEP8

(cherry picked from commit 3428f42120)
2017-05-01 08:57:31 -07:00
Matt Martz
778173ec07 Fix password prompt matching (#24081)
* Fix password prompt matching

* Add some tests for check_password_prompt

* Prevent pep8 line ends with a space error

(cherry picked from commit 040fb4435a)
2017-05-01 11:18:38 -04:00
Brian Coca
8a604185fd make 2.4 compatible
fixes #24148
2017-05-01 11:18:38 -04:00
Toshio Kuratomi
98d223a51b Facts Timeout was not settable via ansible.cfg
The timeout for gathering facts needs to be settable from three places
(highest precedence to lowest):

* programmatically
* ansible.cfg (equivalent to the user specifying it explicitly when
  calling setup)
* from the default value

The code was changed in b4bd6c80de to
allow programmatically and the default value to work correctly but
setting via ansible.cfg/parameter was broken.

This change should fix setting via ansible.cfg and adds unittests for
all three cases

Fixes #23753

(cherry picked from commit d088030fa6)
2017-05-01 08:00:11 -07:00
Nathaniel Case
0467017a70 Remove provider requirement from nxos_vrf (#24118)
Fixes #23920
(cherry picked from commit dce2d5eea9)
2017-05-01 09:33:32 -04:00
Alberto Murillo Silva
776551afa5 Fix ClearLinux pretty name
ClearLinux has changed its pretty name in os-release file
from: 'Clear Linux Software for Intel Architecture'
to: 'Clear Linux OS for Intel Architecture'

This patch makes the SEARCH_STRING 'Clear Linux' rather than
the full name to make it compatible with the old and new name.

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
(cherry picked from commit bb234b9206)
2017-05-01 08:53:23 -04:00
Nick Piper
cf224ab31b Minor typo correction varibles -> variables
No impact as variable wasn't used.
(cherry picked from commit 403c142750)
2017-05-01 08:45:01 -04:00
Nathaniel Case
41a70bf9ca Print specific error for BadHostKeyException (#24120)
(cherry picked from commit f9ec06d1dc)
2017-04-28 14:00:53 -04:00
Ganesh Nalawade
6915e026ed Fix exception in junos_package (#24107) (#24116)
(cherry picked from commit 06732acd4c)
2017-04-28 19:49:00 +05:30
Alex Willmer
20c5aee565 Rename fact returned by docker_network to avoid restricted prefix (#23919)
This fixes #23918
2017-04-28 08:47:07 -05:00
Trishna Guha
e509122aad Remove idle ShellError exception and get_exception() method from nxos modules (#24091)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit aa1f922606bd7b884c8920e4b402788665bc4116)
2017-04-28 10:50:38 +05:30
Ganesh Nalawade
ab79e96c3c Fix exception issue in junos_config (#24066)
ParseError execption is added to ElementTree
in py2.7. Prior to py2.7 need catch ExpatError
execption
(cherry picked from commit 7d710882a8)

* Fix python version check issue (#24063)

Fix python version check issue
(cherry picked from commit 1f7c2c63c2)
2017-04-27 20:52:26 +05:30
Nathaniel Case
b4380432f6 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests

(cherry picked from commit fc0bf87c20)
2017-04-27 11:09:38 -04:00
Matt Clay
126878488f Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.

(cherry picked from commit d662f6f0db)
2017-04-27 11:22:44 +08:00
Toshio Kuratomi
4b2d80f662 Add changelog entry for fetch parameter change 2017-04-26 09:28:29 -07:00
KeepZero
9b00648f21 Set validate_checksum default yes of fetch to match the doc
(cherry picked from commit 98e7d4b49d)
2017-04-26 09:27:34 -07:00
Patrick Ogenstad
456ec66b0a asa_command: set default_output to text (#23979)
(cherry picked from commit 9a0a7f78d7)
2017-04-26 09:47:35 -04:00
Matt Clay
19c4e1a992 Use Shippable image: drydock/u16pytall:master
* Use Shippable image: drydock/u16pytall:master
* Do not install python 3.6 on Shippable.
2017-04-26 15:49:21 +08:00
Brian-Williams
c60b3166b1 Change wait_for time to utc (#23987)
(cherry picked from commit 8466c808d9)
2017-04-25 18:05:10 -04:00
Brian Coca
d1c14e8aa4 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control

(cherry picked from commit e29dc49a49)
2017-04-25 14:51:22 -04:00
Ganesh Nalawade
6ada5cc074 Fixes #23960 junos_config fail with config in xml (#23962) (#23978)
If config is in xml format append it to <configuration>
tag as a instance of Element class.
(cherry picked from commit 15c19367d6)
2017-04-25 22:50:35 +05:30
René Moser
f20cd780a4 exoscale: fix TXT type records handling (#23956)
(cherry picked from commit 3959597f7d)
2017-04-25 13:08:02 +02:00
Trishna Guha
107308f6df Set terminal width for network *_command modules to avoid paging (#23728) (#23952)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit f354bd1eab)
2017-04-25 14:33:59 +05:30
Indrajit Raychaudhuri
8c6a2a848c pacman: Fail fast when 'rc != 0'
We fail-fast and display 'stderr' in case 'pacman' returns with 'rc != 0'.
There is no point computing 'module._diff' in such case anyway.

Fixes #23910
2017-04-25 02:07:06 +02:00
Kai
58666c0ca4 Fix systemd in chroot (#23904)
* Fix systemd in chroot

The 'request ignored' message is in stderr, not stdout.

* Check both stdout and stderr for systemd message

Some versions of systemd report to stderr, others to stdout. Also check
whether output could be a valid normal response to avoid false positives.

(cherry picked from commit cb13aea88b)
2017-04-24 19:54:50 -04:00
Brian Coca
476e8c7136 avoid hosts 'pre templated warnings' (#23878)
* avoid hosts 'pre templated warnings'

fixed is_template failing on undefined
fixes #23057

* py3 compat

(cherry picked from commit a108f0fcd3)
2017-04-24 15:19:50 -04:00
Adrian Likins
2ca4155f23 Use sys.stdout.buffer to write vault bytes to stdout on py3 (#23760)
* Use sys.stdout.buffer to write vault bytes to stdout on py3

We need sys.stdout.buffer on py3 so we can write bytes to it since the plaintext
of the vaulted object could be anything/binary/etc

Before, attempting to write bytes to stdout on py3 would cause:

  TypeError: write() argument must be str, not bytes

(cherry picked from commit e0a7105c2d)
2017-04-24 10:13:22 -04:00
Brian Coca
4b5553c97f fix environment populated detection
fixes #23764

(cherry picked from commit 27185f44b0)
2017-04-21 18:21:17 -04:00
Brian Coca
0878f45a6c keep unsafe .. unsafe (#23742)
* keep unsafe .. unsafe

fixes #23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests

(cherry picked from commit 4594bee65a)
2017-04-21 16:09:48 -04:00
Ganesh Nalawade
a71b6041f6 Fix display argument defualt value (#23859) (#23860)
(cherry picked from commit 04ae977f39)
2017-04-21 19:16:13 +05:30
Ricardo Carrillo Cruz
ee19b19984 Remove catch-all regex on IOS terminal plugin (#23858)
We have a list of specific messages that we scree-scrape and flag
them as legit errors.
However, we also have a catch-all regex that matches everything
starting with %.
That can cause issues on commands that return lines with that
character, like for example the 'crypto key generate'.

Fixes #23770
(cherry picked from commit 8517fbf936)
2017-04-21 15:31:17 +02:00
Ricardo Carrillo Cruz
a1c0c1582b Add assertion on test_iosxr_facts (#23852)
We hit bug #23737 due to bad coverage on test_iosxr_facts, we
were not checking memory facts at all.
(cherry picked from commit 60de93c31d)
2017-04-21 11:21:40 +02:00
Ricardo Carrillo Cruz
283f7f9e24 Fix the iosxr_facts mem gathering (#23850)
We were not calling match.group, plus we were lacking a ':' from
the expected output of 'show memory summary'.

Fixes #23737
(cherry picked from commit d0fd8cefaa)
2017-04-21 10:45:18 +02:00
Trishna Guha
1ea67950e1 Add eos_user module to users parameter (#23847) (#23849)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8ec4882ba0)
2017-04-21 13:36:21 +05:30
Ganesh Nalawade
0d2d9f897c Add doc for display argument of junos_command (#23804)
(cherry picked from commit 01afe12cba)
2017-04-21 02:32:29 -04:00
Matt Davis
a021b4bd8b template hostvars for set_host_overrides (#23839)
* fixes #23586
* temporary solution until connection-specific vars are handled by play_context
(cherry picked from commit 02ed223d49)
2017-04-20 20:34:32 -07:00
Brian Coca
c05aa93739 Revert "fixes play context connection user (#21776)" (#23830)
* Revert "fixes play context connection user (#21776)"

This reverts commit 58ee661437.
fixes #23530

* preserve original in copy

updated comment to clarify wtf is going on here

(cherry picked from commit eb887b8062)
2017-04-20 18:03:21 -04:00
Brian Coca
62811bf134 also skip polling when async failed
(cherry picked from commit 94f0a4edd5dad15f720ec087f04f20bcbef1b97b)
2017-04-20 18:03:21 -04:00
Brian Coca
68fff4a4b5 script fails on async
(cherry picked from commit fe9af903f3)
2017-04-20 18:03:21 -04:00
Brian Coca
4567527249 fix vars file selection
fixes #17382
alternate to #22979

deal with cases in which group/host have . in name
updated as per feedbck
only be strict about extension when doing dirs
also avoid ~ endings

(cherry picked from commit 602a2bca1b)
2017-04-20 18:03:21 -04:00
Brian Coca
1fdeef511c finer grained failed/skipped on async for actions
fixes #23729

(cherry picked from commit 3965689328)
2017-04-20 18:03:21 -04:00
Brian Coca
bc990004e1 fix hashing when path is symlink
(cherry picked from commit 631a10745d)
2017-04-20 18:03:21 -04:00
Nathaniel Case
c9b0026cd0 Eos port default values (#23829)
* Hook port back up for eos cli transport

* The default values have moved

* Why not have conditional defaults?
2017-04-20 16:04:47 -04:00
Nathaniel Case
0609b9ded0 EOS default transport (#23824)
* Give a default to eos transport
2017-04-20 16:04:47 -04:00
Logan Attwood
d74509a235 Use isfile check on package manager paths
(cherry picked from commit 5bbf0d9cb6)
2017-04-20 07:43:25 -07:00
John R Barker
c84a332531 Add guide for Packet host (#21346) (#23807)
* Add guide for Packet host

* incorporate feedback from Packet

* Format headings according to Python doc guide

* fixed rstcheck issues in packet guide

(cherry picked from commit 0b585ec4fd)
2017-04-20 15:01:21 +01:00
Trishna Guha
cc59d89538 Add eos_banner as module to banner param (#23789) (#23798)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit b2129a7d3a)
2017-04-20 16:34:40 +05:30
John R Barker
b7ba7d40ae Show UUID instead of name when using UUID to select snapshot (#23787) (#23794)
(cherry picked from commit 504a768636)
2017-04-20 11:12:58 +01:00
John R Barker
0347dcda05 Minor typo in vmware_guest_facts (#23791) (#23793)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit cc745b0224)
2017-04-20 11:07:16 +01:00
Ricardo Carrillo Cruz
81efc176f4 Add missing provider to eos_banner basic-motd eapi test (#23396)
Otherwise this stalls and timeouts, it doesn't have creds to run.
(cherry picked from commit 2cc2b8fb4d)
2017-04-20 10:57:54 +02:00