Commit graph

6138 commits

Author SHA1 Message Date
Toshio Kuratomi
ccabc2bff5 Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
This reverts commit 0e933f76ba.

The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform.  Tests need to be rewritten
2018-10-22 21:00:15 -07:00
Matt Clay
8d00afc013 Ignore user module use of subprocess. 2018-10-22 17:42:15 -07:00
Matt Clay
8f072ea0f5 Fix sanity test failure. 2018-10-22 17:35:47 -07:00
Brian Coca
581b6aed2e really skip if no boto3
makes no sense to check/skip after you already fail to import
2018-10-22 17:18:25 -04:00
Zhikang Zhang
b697da39c8 Fix problem where pip module cannot accept multiple extras
PR #46937
Fixes #46519
2018-10-22 22:21:45 +02:00
Jocelyn Jaubert
4352a4e54d interfaces_file: Add test for pre-up/post-up with inet/inet6 2018-10-22 20:51:59 +02:00
Jocelyn Jaubert
bd7001cdb6 interfaces_file: Add test for changing ipv4 or ipv6 address through address_family 2018-10-22 20:51:59 +02:00
Jocelyn Jaubert
a4916e848d interfaces_file: Add test for multiple address_family for same iface 2018-10-22 20:51:59 +02:00
Martin Krizek
a0aa53d1a1 user: do not pass ssh_key_passphrase on cmdline
CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-10-22 14:00:55 -04:00
Matt Martz
c58de75f38 Handle sets differently than lists in wrap_var. Fixes #47372 2018-10-22 11:56:28 -04:00
Pablo
6497049f2a Fix exception when including tasks from handlers (#47307)
Set _notified_handlers for the task's _uuid that is run as a handler

Fix #47287
2018-10-22 10:46:36 -05:00
Ganesh Nalawade
335a979f1d
Fix prompt mismatch issue for ios (#47004)
* Fix prompt mismatch issue for ios

Fixes #40884 #44463

*  If the command prompt is matched check if data is
   still pending to be read from buffer.
*  This fix adds a new timer `buffer_read_timeout`
   which will be trigerred after command prompt
   is matched and data is attempted to be read from channel.
   If not data is present of channel the timer will expire
   and response we be returned to calling function.

* Fix unit test failure

* Update to make buffer timeout float

* Update doc and fix review comment

* Fix CI issues

* Update doc

* Fix review comments

* Fix review comments
2018-10-22 21:05:15 +05:30
abarbare
6d6245db0f feat: dynamic security group (#46571) 2018-10-21 16:05:30 +01:00
Christian Kotte
c50a69c2eb VMware: New module vmware_host_powermgmt_policy (#46688)
* New module vmware_host_powermgmt_policy
* minor changes

Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-19 23:15:43 +05:30
Christian Kotte
cd988f645a VMware: New module vmware_host_ipv6 (#47275)
* New module vmware_host_ipv6
* Minor changes

Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-19 22:34:17 +05:30
Christian Kotte
ea42ec7e90 VMware: Improve module vcenter folder (#46497)
* Add datacenter_name alias
* Improve vcenter_folder module
* add check mode support
* fix VM folder deletion
* fix folder deletion under parent folder
* fix (host) folder creation if two datacenters are present
2018-10-19 21:15:58 +05:30
Matt Clay
c24c19594e
Enable pylint rules and fix exposed bugs. (#47219)
* Resolve invalid-unary-operand-type.

* Resolve raising-format-tuple.

* Resolve stop-iteration-return.

* Use disable comment instead of fixing logic.

The affected line in _find_address_range will only fail on Python 3.7
and later if the function is called with an empty address list. As an
internal method it is never called in this way, making it a non-issue
for use via public methods.

Using a comment to disable the rule in favor of an ignore.txt entry
since there are no plans to change the logic in the code itself. This
will also prevent any potential future issues being added in other
parts of the code when updating it based on upstream changes.
2018-10-19 08:32:52 -07:00
Christian Kotte
dc2eb05491 VMware: Add check mode support to vmware_vmkernel_facts (#47286) 2018-10-19 19:24:34 +05:30
Anil Kumar Muraleedharan
0f943f7584 Adding full list of supported devices (#46949) 2018-10-19 09:49:29 -04:00
Pluggi
f13091d142 Add runtime option to docker_container module (#47247)
* Add runtime option to docker_container module

Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>

* Add changelog fragment

Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>

* Add idempotency test for docker_container.runtime

Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
2018-10-19 09:04:17 +01:00
Felix Fontein
131efcff9d docker_network: add basic integration tests (#46137)
* Adding very basic integration tests for docker_network.

* Fixing some details (review comments).
2018-10-19 08:42:27 +01:00
Zim Kalinowski
b0c88ddab1
Adding postgresql firewall rule facts (#45078)
* adding postgresql firewall rule facts

* fixed sanity

* fixed sanity

* updating tests

* firewall rule facts updated

* fixed test

* fix crash

* small updates

* updated postgresql firewall rule

* removed unnecessary type

* fixed postgresql facts

* fixed azure

* one more fix

* test fixes

* fix class name
2018-10-19 15:13:45 +08:00
Felix Fontein
d2f524fb27 Use {{ ansible_python.executable }} instead of python in integration tests. (#47340) 2018-10-19 09:00:34 +02:00
Jordan Borean
e6a327fb82
ansible-test: add retry for Windows httptester download (#47334) 2018-10-19 15:15:03 +10:00
Paul Belanger
e844bfe1d4 Force PEM SSH keys for paramiko
Trying to get ansible-test working on my fedora-28 system, I noticed I
was getting invalid keys from paramiko. It looks like this is because
ssh-keygen is now defaulting to RFC4716 format for private / public
keys.

For now, we can still use PEM based SSH keys, but the long term fix here
is to report a bug to paramiko and support RFC4716 for rsa keys.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-10-18 21:25:55 -07:00
Jordan Borean
c0546b4133
win httptester: add wait for endpoint in case it is still coming up (#47326) 2018-10-19 13:43:54 +10:00
Claude Dioudonnat
1a51b08875 Fix increase fake disk size for filesytem's tests 2018-10-19 01:20:33 +02:00
Pierre-Louis Bonicoli
e016af3cc6 filesystem tests: enable LVM
Co-authored-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
2018-10-19 01:20:33 +02:00
Martin Krizek
541255a2d8
Do not strip new lines in native jinja (#46751)
* Do not strip new lines in native jinja

* Add changelog/fragment
2018-10-19 00:14:43 +02:00
Matt Clay
37b013aca3
Enable additional pylint rules and resolve issues found. (#47221)
* Resolve unneeded-not.
* Resolve global-at-module-level.
* Resolve useless-import-alias.
* Resolve bad-whitespace.
* Resolve global-variable-not-assigned.
* Resolve logging-not-lazy.
* Resolve comparison-with-itself.
2018-10-18 13:38:08 -07:00
Matt Martz
77d32b8f57
Don't use the task for a cache, return a special cache var (#47243)
* Don't use task to cache loop results, use hostvars. Fixes #47207

* Avoid a race condition, supply _ansible_loop_cache through get_vars directly

* Add tests

* Add changelog fragment

* Remove unnecessary copy

* Remove unnecessary host from _get_delegated_vars signature
2018-10-18 15:25:43 -05:00
Matt Clay
f74f7b0373
Add constraint for requests on python 2.6. (#47306)
* Add constraint for requests on python 2.6.
* Use constraints in lookup_hashi_vault test.
2018-10-18 13:05:29 -07:00
Matt Clay
14da4d66f2 Add constraints to pip install in setup_docker. 2018-10-18 10:25:48 -07:00
Toshio Kuratomi
bcd6dbcd65 Remove get_exception from the remainder of the modules 2018-10-18 08:37:04 -07:00
Ryan Brown
18a088c64e
GCP MagicModules bug fixes (#47285)
Closes: #46930 #46929 #46928 #46927 #46926 #46925 #46924 #46923 #46922 #46921 #46920 #46919 #46918 #46917 #46916 #46915 #46914 #46913 #46912 #46911 #46910 #46909 #46908 #46907 #46906 #46905 #46903 #46902 #46901 #46900 #46899 #46898 #46897 #46896 #46895 #46894 #46893 #46892 #46891 #46890 #46889 #46888 #46887 #46886 #46885 #46884 #46883 #46882 #46881 #46880 #46879 #46878 #46877 #46876 #46875 #46874 #46873 #46872 #46871 #46870 #46869 #46868 #46867 #46866 #46865 #46864 #46863 #46862 #46861 #46860 #46859 #46858 #46857 #46856 #46855 #46854 #46853 #46852
2018-10-18 10:55:42 -04:00
flowerysong
0fc639e755 ec2_tag: Fix removing tags without specifying a value (#47228) 2018-10-18 10:13:08 -04:00
Alex Stephen
3f629c426c New GCP Module: gcp_compute_region_disk (#46886) 2018-10-18 10:08:14 -04:00
Pierre-Louis Bonicoli
7231f7da84 test-module: check availability of special attrs 2018-10-18 09:45:56 +02:00
Jordan Borean
5d2927c9a0
test: filesystem update note on test comment (#47260) 2018-10-18 17:10:16 +10:00
Matt Martz
90d2620939 Remove deprecated os_server_actions alias (#47208)
* Remove deprecated os_server_actions alias. Fixes #44991

* Skip os_server_actions
2018-10-18 16:44:44 +10:00
Shuang Wang
0c6513e9b1 add module aws_codecommit to represent AWS CodeCommit (#46161)
* kick off

* done for the day

* beta code and test

* fix a typo

* boto3_conn and boto_exception aren't used in this code, ec2_argument_spec is used but unneeded.

* Returning when find a match avoids doing extra work, especially when pagination is involved

* add new permissions for test

* (output is changed) is preferred over accessing the attribute directly.

* pass the result through camel_dict_to_snake_dict() before returning it.

* AnsibleAWSModule automatically merges the argument_spec.

* deletes the created resources even if a test fails.

* AnsibleAWSModule automatically merges the argument_spec.

* fix typo

* fix pep8

* paginate list_repositories

* specify permissions for test

* cut the unnecessary code.

* add return doc string

* add missed ':'

* fix syntax error: mapping values are not allowed here

* add description for return

* fix syntax error

* rename module name and turn off automated integration test.
2018-10-18 14:32:06 +10:00
Jordan Borean
ae5aeb9a67
filesystem: fix test to work on newer Fedora (#47176) 2018-10-18 05:36:37 +10:00
Jordan Borean
6666b070a9
openss: fix various test and Python 3 issues (#47188) 2018-10-18 05:29:18 +10:00
Matt Clay
1947d903cd Mark azure_rm_{appserviceplan,webapp} unstable. 2018-10-17 11:36:12 -07:00
Aaron
9c08ff7a94 [aws] New module: iam_password_policy (#36200)
* Adding iam_password_policy module

* fixing various issues -- error handling, bugs

* fixing various issues based on tests

* renaming dummy var

* fixing type reference in documentation

* adding int tests and other updates

* removing typo

* fixing auth for int tests

* removing int tests for now

* readding integration tests w/ unsupported designation

* removing conflicting group

* Update aliases

* Fix unused variable
2018-10-17 13:56:13 -04:00
Steve Dodd
ee6ab5d5aa Add support for IOS vlan parsing filter. (#40555)
* Add support for IOS vlan parsing filter.
Example usage below:

{% set parsed_vlans = vlans | vlan_parser %}
switchport trunk allowed vlan {{ parsed_vlans[0] }}
{% for i in range (1, parsed_vlans | count) %}
switchport trunk allowed vlan add {{ parsed_vlans[i] }}

* Update test_network.py

Add import statement for filter

* Fixed PEP8 issues relating to comments

* Fix PEP8 issues related to blank lines

* Removed magic numbers for line lengths. This should generalize support
to other IOS-like NOS that use similar methods for listing vlans. The
default arguments for line lengths will still be specific to Cisco IOS.
The unit tests for line length are still specific to Cisco IOS.
2018-10-17 20:50:28 +05:30
Jordan Borean
dd46f953f6
postgresql_user: fix test errors on newer Fedora versions (#47166) 2018-10-17 14:01:11 +10:00
Jordan Borean
f720499337
gem: fix tests to work on newer Fedora hosts (#47158) 2018-10-17 10:43:30 +10:00
Matt Clay
d048785640 Update requirements for urllib3 for python 2.6. 2018-10-16 14:08:46 -07:00
Jordan Borean
9ba33f6ac1
test: openssl 1.1.x compatibility (#47112) 2018-10-17 05:38:52 +10:00