Commit Graph

6223 Commits (ec48e854c969559b736b9b31bd8e565d20329088)

Author SHA1 Message Date
Dario Zanzico 2162d7d4de Docker swarm service integration tests (#45674)
* integration test for docker_swarm_service

* ensure stack de-initialization

* Set default value for 'configs' parameter to None

Docker-py uses None as a default value for configs.
Using the same default here allows to create services on older docker
setups (docker_api<1.30).

* Set default value for 'update_order' parameter to None

Docker-py uses None as a default value for update_order.
Using the same default here allows to create services on older docker
setups (docker_api<1.29)

* Set default value for 'publish.mode' parameter to None

Docker-py uses None as a default value for publish_mode.
Using the same default here allows to create services on older docker
setups (docker_api<1.32)

* Allow tests to run on older version of docker.

* remove workarounds for old docker versions

* test correct swarm cleanup

* changelog fragment for docker_swarm_service defaults change
6 years ago
Felix Fontein 92d9569bc9 ACME: add support for POST-as-GET if GET fails with 405. (#44988)
* Add support for POST-as-GET if GET fails with 405.

* Bumping ACME test container version to 1.4. This includes letsencrypt/pebble#162 and letsencrypt/pebble#168.

* Also use POST-as-GET for account data retrival.

This is not yet supported by any ACME server (see letsencrypt/pebble#171),
so we fall back to a regular empty update if a 'malformedRequest' error is
returned.

* Using newest ACME test container image.

Includes letsencrypt/pebble#171 and letsencrypt/pebble#172, which make Pebble behave closer to the current specs.

* Remove workaround for old Pebble version.

* Add changelog entry.

* First try POST-as-GET, then fall back to unauthenticated GET.
6 years ago
Zim Kalinowski 7c11c67156
adding enable_rbac option in aks (#47730)
* adding enable_rbac option in aks

* fixes

* addressed comments
6 years ago
Zim Kalinowski bc1e6b3039 pre-adding new packages to save testing time while merging new resources (#47729) 6 years ago
Ganesh Nalawade 17fea30841
Revert "enhance recv calls in network_cli (#47345)" (#47731)
This reverts commit c649d0ea32.

The change results in deadlock in network_cli while it is
waiting to check the return value of recv_ready() which
was added in this commit to improve performance
6 years ago
Christian Kotte d052618838 VMware: Add check mode support in vmware_vswitch_facts (#47263)
* Check mode support
* Fixed num_ports
6 years ago
Tim Rupp d5d18a995a
Removes f5 sdk from bigiq modules and fixes unit tests (#47720) 6 years ago
Tim Rupp b7a937cb0d
Updates bigiq_utility_license_assignment for ansible 2.8 (#47719) 6 years ago
Christian Kotte c779ef5313 VMware: New module: vmware_host_hyperthreading (#46750) 6 years ago
Brandon Bell 5568ffd45b Fix syntax error for Python 2.6 (#47635)
* Fix syntax error for Python 2.6

* Removing consul.py from pylint/ignore.txt
6 years ago
Rémy Léone 338605882e Add support for adding custom query parameters to URL (#46390) 6 years ago
John Hu 82f1438b14 Add docker_config module (#38792)
* Add docker_config module

* Address review comments

* Merge description lines

* Stop returning empty config_id in results

* Add integration tests for docker_config

Based on docker_secret's tests.

* Ensure swarm using docker_swarm module

* Add minimum docker / docker api version requirements

ref: https://github.com/ansible/ansible/pull/47046

* Check Docker API version before running tests

ref: https://github.com/ansible/ansible/pull/47340

* Typo

* Wording

* Improve example

* Assert state == absent is idempotent
6 years ago
f-bor c649d0ea32 enhance recv calls in network_cli (#47345)
* enhance recv calls in network_cli

* updated network_cli test unit

* enhance recv calls in network_cli

* fix mistake

* better timeout management

* remove exception trigger

* test

* test2

* restore exception and timeout

* ganeshrn's way

* correction

* timeout and exception return
6 years ago
Ingate Systems 9fe20123cf modules: network: Add initial support for Ingate modules (#47494)
* modules: network: Add initial support for Ingate modules

* modules: network: Add ingate module ig_unit_information

* module_utils: network: ingate: Use default 'v1' for version

* modules: network: ingate: Remove unused code
6 years ago
s3lph 5b1c68579d Type error in openssl_certificate (#47508)
* Fixed #47505: Type error in openssl_certificate
* Use to_bytes instead of str.encode in SelfSignedCertificate. Updates #47508
* Use to_bytes instead of str.encode in OwnCACertificate
* Added integration tests for openssl_certificate: selfsigned_not_before/after and ownca_not_before/after
6 years ago
Felix Fontein f19ab56eb4 docker_image, docker_image_facts, docker_volume: add basic integration tests (#47383)
* Add docker_image_facts tests.

* Add basic integration test for docker_volume.

* Add basic docker_image tests.

* Only start test registry when tests are actually run (i.e. not on CentOS 6).
6 years ago
Matt Martz 10e129e2e9 Detect the socket path after starting the service. Fixes #47582 6 years ago
Zim Kalinowski 1724b633f2
adding subnet service endpoints (#47549)
adding subnet service endpoints
6 years ago
Zim Kalinowski 5193e31886
adding mysql firewall rule facts (#47342)
* adding mysql firewall rule facts

* fixes
6 years ago
Zim Kalinowski 1cb78209ae
upgrading sql package to newest (#47544)
* upgrading sql package to newest

* LROPOller
6 years ago
Zim Kalinowski 4cda7a7883
upgrading rdbms to the latest version (#47547) 6 years ago
Zim Kalinowski 9b2465e7ad
added missing stuff to aliases (#47458) 6 years ago
Yunge Zhu 1587bb9f65
fix webapp test (#47546) 6 years ago
abarbare b4a9b29ab2 feat: add security_group to scaleway compute resource (#45699)
feat: add more tests
6 years ago
Toshio Kuratomi 748ea39ecd Fix mysql authentication errors
The mysql-server package on Ubuntu16.04 was recently updated to disallow
unauthenticated root user login over tcp/ip.  This, coupled with pymysql
using tcp/ip whenever host and port is specified causes us to fail to
connect to the database when testing Python3 on Ubuntu16.04.

The fix is to use the unix socket instead.
6 years ago
lolcube eb7f6a5e62 Add openssh_keypair module (#46436)
* add openssh_keypair module
6 years ago
Akshay Gaikwad 20b95adf2b Add Support of healthcheck in docker_container module (#46772)
* Add Support of healthcheck in docker_container module

Fixes #33622
Now container can be started with healthcheck enabled

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Extend docker_container healthcheck (#1)

* Allowing to disable healthcheck.

* Added test for healthcheck.

* Make sure correct types are used.

* Healthcheck needs to be explicitly disabled with test: ['NONE'].

* pep8 fixes

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Fix bug if healthcheck interval is 1 day or more

`timedelta` object has days too and seconds are up to one day.
Therefore use `total_seconds()` to convert time into seconds.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add test for healthcheck when healthcheck is not specified

This is to avoid the situation when healthcheck is not specified and
treat this as healthcheck is changed or removed.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Convert string syntax for healthcheck test to CMD-SHELL

Also add another test case to check idempotency when healthcheck test
is specified as string

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Playbook fails if minimun docker version is not satisfy for healthcheck

This is to make more consistent with other non-supported options.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
6 years ago
Zim Kalinowski 0fb0ea2ab3
upgrading msrest packages (#47541) 6 years ago
Dag Wieers 691ff4b9e6 WinRM/PSRP: Ensure shell returns UTF-8 output (#47404)
* WinRM/PSRP: Ensure shell returns UTF-8 output

This PR makes UTF-8 output work in PSRP shells.

* Add win_command and win_shell integration tests

* Fix tests

* more test fixes
6 years ago
Jordan Borean f28b7c7ab1
psrp - fix unicode handling in Python 2 (#47461)
* psrp - fix unicode handling in Python 2

* skip psrp become test when on Server 2008
6 years ago
John R Barker fb2e838a42
TEMP HACK: Avoid overloading codecov.io (#47515)
Without this patch we are overloading codecov.io by uploading 90+ tests.

As a workaround limit uploading to only "Group 1"

Will be removed/updated based on codecov.io's support team
6 years ago
Matt Martz f6ecdf0b87
Handle sets differently than lists in wrap_var. Fixes #47372 (#47510) 6 years ago
Matt Martz d5e4f37ca0
Ensure we don't overwrite roles from include/import_role when loading the play (#47512)
* Ensure we don't overwrite roles from include/import_role when loading the play. Fixes #47454

* Add changelog fragment
6 years ago
Felix Fontein 3afdb28209 docker_container: fix interaction of detach:no with auto_remove:yes (#47396)
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.

* Add tests.

* Added changelog.
6 years ago
Dave Bendit 29b4b36501 Adding "internal" option to "docker_network" module (#35370)
Fixes #27065
6 years ago
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
6 years ago
Matt Clay 8d00afc013 Ignore user module use of subprocess. 6 years ago
Matt Clay 8f072ea0f5 Fix sanity test failure. 6 years ago
Brian Coca 581b6aed2e really skip if no boto3
makes no sense to check/skip after you already fail to import
6 years ago
Zhikang Zhang b697da39c8 Fix problem where pip module cannot accept multiple extras
PR #46937
Fixes #46519
6 years ago
Jocelyn Jaubert 4352a4e54d interfaces_file: Add test for pre-up/post-up with inet/inet6 6 years ago
Jocelyn Jaubert bd7001cdb6 interfaces_file: Add test for changing ipv4 or ipv6 address through address_family 6 years ago
Jocelyn Jaubert a4916e848d interfaces_file: Add test for multiple address_family for same iface 6 years ago
Martin Krizek a0aa53d1a1 user: do not pass ssh_key_passphrase on cmdline
CVE-2018-16837

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
6 years ago
Matt Martz c58de75f38 Handle sets differently than lists in wrap_var. Fixes #47372 6 years ago
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
6 years ago
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
6 years ago
abarbare 6d6245db0f feat: dynamic security group (#46571) 6 years ago
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>
6 years ago
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>
6 years ago
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
6 years ago
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.
6 years ago
Christian Kotte dc2eb05491 VMware: Add check mode support to vmware_vmkernel_facts (#47286) 6 years ago
Anil Kumar Muraleedharan 0f943f7584 Adding full list of supported devices (#46949) 6 years ago
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>
6 years ago
Felix Fontein 131efcff9d docker_network: add basic integration tests (#46137)
* Adding very basic integration tests for docker_network.

* Fixing some details (review comments).
6 years ago
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
6 years ago
Felix Fontein d2f524fb27 Use {{ ansible_python.executable }} instead of python in integration tests. (#47340) 6 years ago
Jordan Borean e6a327fb82
ansible-test: add retry for Windows httptester download (#47334) 6 years ago
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>
6 years ago
Jordan Borean c0546b4133
win httptester: add wait for endpoint in case it is still coming up (#47326) 6 years ago
Claude Dioudonnat 1a51b08875 Fix increase fake disk size for filesytem's tests 6 years ago
Pierre-Louis Bonicoli e016af3cc6 filesystem tests: enable LVM
Co-authored-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
6 years ago
Martin Krizek 541255a2d8
Do not strip new lines in native jinja (#46751)
* Do not strip new lines in native jinja

* Add changelog/fragment
6 years ago
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.
6 years ago
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
6 years ago
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.
6 years ago
Matt Clay 14da4d66f2 Add constraints to pip install in setup_docker. 6 years ago
Toshio Kuratomi bcd6dbcd65 Remove get_exception from the remainder of the modules 6 years ago
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
6 years ago
flowerysong 0fc639e755 ec2_tag: Fix removing tags without specifying a value (#47228) 6 years ago
Alex Stephen 3f629c426c New GCP Module: gcp_compute_region_disk (#46886) 6 years ago
Pierre-Louis Bonicoli 7231f7da84 test-module: check availability of special attrs 6 years ago
Jordan Borean 5d2927c9a0
test: filesystem update note on test comment (#47260) 6 years ago
Matt Martz 90d2620939 Remove deprecated os_server_actions alias (#47208)
* Remove deprecated os_server_actions alias. Fixes #44991

* Skip os_server_actions
6 years ago
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.
6 years ago
Jordan Borean ae5aeb9a67
filesystem: fix test to work on newer Fedora (#47176) 6 years ago
Jordan Borean 6666b070a9
openss: fix various test and Python 3 issues (#47188) 6 years ago
Matt Clay 1947d903cd Mark azure_rm_{appserviceplan,webapp} unstable. 6 years ago
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
6 years ago
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.
6 years ago
Jordan Borean dd46f953f6
postgresql_user: fix test errors on newer Fedora versions (#47166) 6 years ago
Jordan Borean f720499337
gem: fix tests to work on newer Fedora hosts (#47158) 6 years ago
Matt Clay d048785640 Update requirements for urllib3 for python 2.6. 6 years ago
Jordan Borean 9ba33f6ac1
test: openssl 1.1.x compatibility (#47112) 6 years ago
Matt Martz 02f4d0a57f
Ensure that an empty literal list with loop skips the task (#47129) 6 years ago
Matt Clay 6a51b5ed26 Use 4 nodes for sanity tests in CI. 6 years ago
Matt Clay 5c7f876d0d
Update default-test-container to version 1.4.1. (#47042) 6 years ago
Fran Fitzpatrick ab8ed2f84d Add unit tests for junos terminal (#47103) 6 years ago
Jordan Borean 9a5561da0f
ansible-test: setup up http runner in between each target (#47100)
* ansible-test: setup up http runner in between each target

* review changes
6 years ago
Matt Hoffman acbecd5f23 adds redirect configurations and probes to azure_rm_appgateway (#46607) 6 years ago
jctanner 1ded3f9890
Handle non-ascii characters in foreman.py (#46779)
* Handle non-ascii characters in foreman.py

* Add test to validate non-ascii results
6 years ago
Jordan Borean 69e1088ec1
ansible-test: run win httptester with bypass policy (#47090) 6 years ago
Matt Clay 38eba60849 Fix ansible-test --exclude with delegation.
Previously the option worked with integration commands but not units or sanity.
6 years ago
Matt Clay 2761fe8272 Revert "Use 4 nodes for sanity tests in CI."
This reverts commit b887333029.
6 years ago
Matt Clay c3a6737004 Add BOM check to shebang sanity test.
Includes fixes for docsite files with a UTF-8 BOM.
6 years ago
Matt Clay b887333029 Use 4 nodes for sanity tests in CI. 6 years ago
Zim Kalinowski 1c520ff70b adding postgresql firewall rule (#45077)
* adding postgresql firewall rule

* fixed test problems

* add state into the doc

* use lropoller

* updated samples and some naming
6 years ago
Zim Kalinowski ca5460dd86 Adding mysql firewall rule module (#45074)
* adding mysql firewall rule

* fixed mysql firewall rule

* use mgmtclient from common

* fix pep8

* small updates

* minor docs fix
6 years ago
Matt Clay 7507bc9e19 Add sphinx constraint for rstcheck compatibility. 6 years ago