Commit graph

23841 commits

Author SHA1 Message Date
Simon Dodsley
e5b6abadaf Add Pure Storage FlashBlade module to manage network interfaces (#44421) 2018-10-30 09:43:23 +00:00
Felix Fontein
73533d3fc2 docker_* modules: simplify idempotency comparisons (#47709)
* More generic comparison code from docker_container to docker_common.

* More flexibility if a is None and method is allow_to_present.

Note that this odes not affect docker_container, as there a is never None.

* Update docker_secret and docker_config: simplify labels comparison.

* Added unit tests.

* Use proper subsequence test for allow_more_present for lists.

Note that this does not affect existing code in docker_container, since lists
don't use allow_more_present. Using allow_more_present will only be possible
in Ansible 2.8.

* pep8
2018-10-30 08:50:34 +00:00
Etienne Perot
e217ba6e19 docker_image: Fix up 'changed' event in force mode (#33754)
* docker_image: Fix up 'changed' event in force mode

This is the same as https://github.com/ansible/ansible/pull/19235 except it applies to all image-building modes (building the image locally, loading the image from an archive, or pulling the image), rather than only when pulling the image.

* Use 'dummy' rather than '_' as unused variable name.

* Add changelog fragment for pull request #33754
2018-10-30 08:48:30 +00:00
Susant Sahani
2596ac196f nmcli: Introduce VxLan (#45932)
This work enables to add vxlan via nmcli module

```
  - nmcli:
      type: vxlan
      conn_name: vxlan_test1
      vxlan_id: 16
      vxlan_local: 192.168.1.2
      vxlan_remote: 192.168.1.5
```
ansible 2.8.0

revision 1: Added tests

Signed-off-by: Susant Sahani <susant@redhat.com>
2018-10-30 03:17:33 -04:00
Christian Kotte
e0f7a522a3 VMware: Improve module vmware_host_vmnic_facts (#47278)
* fix "AttributeError: 'NoneType' object has no attribute 'nicDevice'"
* add vmnic_details output (speed, duplex, vendor, mac, etc. pp.)
* add NIC capabilities, DirectPath I/O, and SR-IOV information output
* add num_vmnics
2018-10-30 12:21:50 +05:30
Tim Rupp
1ddfac5ad5
Fixes unit tests for vcmp guest module (#47792)
Tests were not working for ansible 2.8
2018-10-29 21:51:50 -07:00
Christian Kotte
6ebd20bf22 VMware: New module: vmware_host_vmhba_facts (#47502) 2018-10-30 10:10:43 +05:30
Tim Rupp
1aae9ad282
Remove f5-sdk from bigip_virtual_address module (#47791)
Removes the f5-sdk and fixes unit tests for ansible 2.8
2018-10-29 21:38:10 -07:00
Tim Rupp
3ad1cb5619
Adds bigip_device_syslog module (#47790)
This module can be used to alter the device syslog settings and
priorities for syslog settings
2018-10-29 21:24:24 -07:00
Tim Rupp
e0d2419683
Adds firewall global rules module (#47789)
This module allows the user to change global rules in AFM firewalls
2018-10-29 21:10:49 -07:00
Tim Rupp
10f3e0c187
Adds module to manage cookie persistence profiles in BIG-IP (#47786) 2018-10-29 20:47:25 -07:00
Tim Rupp
7336dd595b
Adds ipsec policy module for BIG-IP (#47785)
Allows users to manage IPSec policies on a BIG-IP
2018-10-29 15:49:22 -07:00
Tim Rupp
9d2f68e00a
Adds bigip_traffic_selector module (#47784)
This module enables the user to manage traffic selector policies on a BIG-IP
2018-10-29 15:27:18 -07:00
Tim Rupp
d69b8e4bfd
Import mdule for managing sys daemon logs in BIG-IP (#47783)
This module allows one to manage the daemon log settings in tmm on BIG-IP
2018-10-29 15:16:51 -07:00
Tim Rupp
9d351f2ee7
Adds bigip profile for http2 (#47782)
This allows one to manage HTTP2 profiles on a BIG-IP
2018-10-29 14:53:20 -07:00
Tim Rupp
f80288c0c4
Adds bigip_monitor_ldap module (#47781)
Adds new module to manage LDAP monitors on a BIG-IP
2018-10-29 14:42:49 -07:00
Tim Rupp
114d591f31
Adds bigip_ike_peet module (#47780)
Adds new module to managing IKE peers
2018-10-29 14:25:43 -07:00
Tim Rupp
92cf066514
Adds any ip proto to virtual server module (#47779) 2018-10-29 14:09:59 -07:00
Tim Rupp
8edbfb488c
Adds new parameters to bigip_vlan (#47777)
Also fixes unit tests to work in ansible 2.8
2018-10-29 13:57:53 -07:00
Tim Rupp
7c84ba8051
Fixes tests in bigip_wait for ansible 2.8 (#47773) 2018-10-29 13:08:35 -07:00
René Moser
58238375b4 apt: warn users on auto-install dep (#47704)
* apt: warn users on auto-install dep

* add changelog
2018-10-29 19:56:15 +01:00
Tim Rupp
8ede4c5e60
Adds more facts to bigiq_device_facts (#47765)
Adds more facts to the bigiq_device_facts module
2018-10-29 11:33:47 -07:00
Dag Wieers
3e890bdbaa
Initial import of MSC module_utils (#46116)
This is required for upcoming MSC modules.
2018-10-29 18:45:42 +01:00
Tim Rupp
6e28b7d572
Remove the f5-sdk from more bigiq modules (#47721) 2018-10-29 10:10:11 -07:00
Abhijeet Kasurde
e7c83d6aa9
VMware: correct logic to pass ESXi SSL thumbprint (#47600)
Due to refactoring of task_error and wait_for_task method,
SSL thumbprint was lost in error message. This fixes the
retry mechanism of AddHost task.

Fixes: #47563

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-29 20:59:11 +05:30
Tzur Eliyahu
524c5190b8 IBM_Storage: Added a module to define volume mapping on IBM spectrum … (#45110)
* IBM_Storage: Added a module to define volume mapping on IBM spectrum Accelerate
storage systems.

* docs fix

* IBM_storage: review and pep8 fixes
2018-10-29 09:50:50 -04:00
Rémy Léone
7837497b0b Fix netbox url with urljoin (#47655) 2018-10-29 13:17:06 +00:00
Simon
893c0dbba7 New facts module: Memset server products (#42386)
* initial commit of facts module for Memset VPS/dedicated server products

* add missing brace

* add integration tests (disabled until we have a mock API to test against)

* bump ansible release version to 2.8
2018-10-29 12:28:00 +00:00
Simon
2d6c01005d New facts module: Memset Memstore (#42387)
* initial commit of facts module to return usage of a Memstore cloudstorage product

* switch API wrapper to use basic auth instead of passing the api_key in the body

* add integration tests (disabled until we have a mock API to test against)

* bump ansible release version to 2.8
2018-10-29 12:27:03 +00:00
Ondra Machacek
36b0aed03a ovirt_host_network: Fix type conversion (#47617)
Signed-off-by: Ondra Machacek <omachace@redhat.com>
2018-10-29 11:49:58 +00:00
codylane
d3fe6c01f2 Addresses comments in #38971 (#44324)
* Controlled params within no section

* Added tests to control params within no section

* Cleaning output_file before creating no-section params and check the content

* addresses comment in PR "s/hate/beverage/g"
2018-10-29 11:33:14 +00:00
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
2018-10-29 11:28:51 +00:00
Simon Dodsley
bba8c23585 Add user_agent into FlashBlade API calls (#46221) 2018-10-29 11:28:00 +00:00
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.
2018-10-29 10:32:53 +01:00
Felix Fontein
b9706e2ff5 docker_container: improve race condition behavior for detach:no, auto_remove:yes behavior (#47712)
* Don't die when get_container is called for container which is terminating during get_container call.

If it terminates between client.containers() and client.inspect_container(),
the module will fail with an error such as
    Error inspecting container: 404 Client Error: Not Found ("No such container: xxx")

* Add changelog.
2018-10-29 08:22:52 +00:00
Abhijeet Kasurde
a87a62ba8a
VMware: restore timeout in set_vm_power_state operation (#47723)
'state_change_timeout' parameter was removed, this introduced
regression.

Fixes: #47722

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-29 12:08:17 +05:30
Zim Kalinowski
7c11c67156
adding enable_rbac option in aks (#47730)
* adding enable_rbac option in aks

* fixes

* addressed comments
2018-10-29 14:36:38 +08:00
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
2018-10-29 09:50:30 +05:30
Omar Chehab
9cfa55619b Update cloudfront_distribution module docs (#47726)
Fix typo in `custom_error_responses` description, changed reponse to response

+label: docsite_pr
2018-10-29 08:45:03 +05:30
Christian Kotte
d052618838 VMware: Add check mode support in vmware_vswitch_facts (#47263)
* Check mode support
* Fixed num_ports
2018-10-28 20:00:51 +05:30
Abhijeet Kasurde
3568dc512a
Misc typo fixes (#47699)
fixes requried to required

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-28 12:35:30 +05:30
Jasmine Hegman
303fa6b478 Add to k8s_raw docs re: vault-encrypted files (#47328)
* Add to k8s_raw docs re: vault-encrypted files

I didn't read the examples far enough and maybe would not have tried all the examples so I ended up creating https://github.com/ansible/ansible/issues/47259 and learned that definition key with lookup works well and we agreed the docs should say something. :)

+label: docsite_pr

* Add note about ansible vault-encrypted files to src: param

* Remove trailing whitespace

* Make changes from feedback

* Make feedback changes
2018-10-28 16:17:44 +10:00
Tim Rupp
d5d18a995a
Removes f5 sdk from bigiq modules and fixes unit tests (#47720) 2018-10-27 20:20:07 -07:00
Simon Dodsley
9903ef2a0f Add support for AC pods, Virtual Groups and Offload Targets in Pure Storage (#45760)
FA Fact module
2018-10-27 14:39:37 -04:00
Mike Healey
8f7c857960 VMware: Add url quoting to support spaces in paths provided by the user (#46708) 2018-10-27 21:45:00 +05:30
Christian Kotte
c779ef5313 VMware: New module: vmware_host_hyperthreading (#46750) 2018-10-27 21:42:41 +05:30
David Passante
0099e7f57e cs_account: add ability to bind accounts to LDAP (#46219) 2018-10-27 05:00:18 -04:00
Abhijeet Kasurde
64171f5524 Ignore empty result of rabbitmqctl list_parameters (#47021)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-27 02:58:10 -04:00
Adrián López
a4b9af740a cyberarkpassword: Typo in cquery parameter (#47605)
Removed extraneous quotes from docs
2018-10-27 11:40:58 +05:30
Matthew Hellmer
2b52eadebb zabbix_proxy: Fixed a typo (#47698)
changed requried to required
2018-10-27 11:07:24 +05:30
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
2018-10-27 12:43:53 +10:00
Johannes Brunswicker
d3be5d5327 Creates base Sophos UTM module (#45781)
* Fixes #18568
* Commit of the first set of utm modules
* added documentation line for module_utils file
* removed other utm modules for the first pr
* added maintainers to botmeta
* implemented fixes for shippable
* fixed whitespaces and newlines in included doc fragment
* added types and choices to documentation
* fix for E501
* Implemented change requests
* changed utm_utils license to BSD
* changed str() to to_native()
* added a status state that will just return information about my object
* renamed state 'status' to 'info'
* added team_e-spirit to botmeta and added the team as maintainer for the utm_utils
* only return a result if the lookup was not empty. Do not return a null result
* removed info state
* added boilerplate
* made preparation for info-only modules
2018-10-26 23:21:54 +05:30
Philip Bove
055ee048ce VMware: Fixed vmware fact gathering when no physical interfaces have IP Addresses (#42600)
* Changed vmware_guest_facts to accuretly reflect ip as displayed in vcenter
* fixed ipv6 check
2018-10-26 23:11:58 +05:30
Matt Martz
3633e21780
Add missing self._supports_async to uri action plugin (#47677)
* Add missing self._supports_async to uri action plugin. Fixes #47660

* Additional changes needed to support async

* Missed a call to execute_module
2018-10-26 12:16:26 -05:00
Rémy Léone
338605882e Add support for adding custom query parameters to URL (#46390) 2018-10-26 15:20:00 +01:00
Ondra Machacek
ec441cd4bc ovirt_host_pm: Fix to powermanagement module (#47659)
This PR is fixing following issues:

 1) Don't try to check password.
 2) Check options.
 3) Order wasn't adding at the end, as doc says.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
2018-10-26 08:51:38 -04:00
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
2018-10-26 10:58:17 +01:00
Artem Bityutskiy
b3ec97cd36 swupd: fail in case of an incorrect bundle (#45993)
For some strange reasons the 'swupd' module does not fail if I specify a
non-existing bundle like "xxx". This is inconsistent with other modules, for
example 'dnf'.

The end result is that if someone uses the 'package' module, the result is
inconsistent across OSes: for Fedora trying to install an non-existing module
fails, bot for Clear Linux it just prints a warning and succeeds.

This patch fixes the inconsistent behavior. With this patch 'swupd' will fail
if one tries to install a bundle that does not exist.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2018-10-26 09:13:03 +01:00
Jim Gu
99ee30768a VMware: Avoid misleading PyVmomi error if requests import fails (#47313)
* Avoid misleading PyVmomi error if requests import fails

Requests is imported by the VMware module_utils as an external
dependency; however, because it is in a try/catch block containing the
imports for PyVmomi, if requests fails to import properly, Ansible will
instead complain about PyVmomi not being installed.

By moving the import outside of the try/catch block, if requests fails
to import, an error like the following will be returned:

    ImportError: No module named requests

This should result in less confusion.

* catch requests ImportError
2018-10-26 12:40:25 +05:30
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
2018-10-26 09:49:17 +05:30
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
2018-10-26 09:47:58 +05:30
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
2018-10-26 09:11:00 +05:30
Guido García
8f3c29a98f feat: support postgres 10 in azure_rm_postgresqlserver (#47003)
Add support to Azure Postgres 10.x (see [azure official docs](https://docs.microsoft.com/lv-lv/azure//postgresql/concepts-supported-versions)).
2018-10-26 11:37:54 +08:00
Milosz Galazka
04dd21dabb Update proxysql_manage_config.py (#47613)
Incorrect example - wrong module used (proxysql_global_variables instead of proxysql_manage_config)

+label: docsite_pr
2018-10-26 11:35:01 +10:00
curry9999
4906be1009 An error occurs if cluster_id is not specified (#47500)
* 	modified:   google/gcp_compute_backend_bucket.py
	modified:   google/gcp_compute_backend_service.py
	modified:   google/gcp_compute_forwarding_rule.py
	modified:   google/gcp_compute_global_forwarding_rule.py
	modified:   google/gcp_compute_image.py
	modified:   google/gcp_compute_instance.py
	modified:   google/gcp_compute_instance_group.py
	modified:   google/gcp_compute_instance_group_manager.py
	modified:   google/gcp_compute_instance_template.py
	modified:   google/gcp_compute_route.py
	modified:   google/gcp_compute_subnetwork.py
	modified:   google/gcp_compute_target_http_proxy.py
	modified:   google/gcp_compute_target_https_proxy.py
	modified:   google/gcp_compute_target_ssl_proxy.py
	modified:   google/gcp_compute_target_tcp_proxy.py
	modified:   google/gcp_compute_url_map.py
	modified:   google/gcp_container_node_pool.py
	modified:   google/gcp_dns_resource_record_set.py
	modified:   google/gcp_pubsub_subscription.py
	modified:   google/gcp_storage_bucket_access_control.py

* 	modified:   lib/ansible/modules/cloud/amazon/aws_ses_identity.py
	modified:   lib/ansible/modules/cloud/amazon/route53_facts.py
	modified:   lib/ansible/modules/cloud/cloudscale/cloudscale_server.py
	modified:   lib/ansible/modules/network/aos/_aos_logical_device.py
	modified:   lib/ansible/modules/network/aos/_aos_rack_type.py
	modified:   lib/ansible/modules/network/aos/_aos_template.py
	modified:   lib/ansible/modules/network/cumulus/nclu.py
	modified:   lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_launch.py
	modified:   lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_wait.py

* An error occurs if cluster_id is not specified

* An error occurs if cluster_id is not specified
2018-10-26 11:07:40 +10:00
Ross Williams
300db3af84 Module portinstall: use_packages is a bool (#47370)
The module has been checking if use_packages is
a string equal to "yes", but AnsibleModule actually
converts the use_packages argument to a bool.
2018-10-26 10:49:31 +10:00
Matt Martz
f7ba63e047
Add shorthand debugger method to recreate the task from the original ds (#46987)
* Add shorthand debugger method to recreate the task from the original ds, and re-template. Fixes #46321

* Fix rst header

* Indicate update_task was added in 2.8
2018-10-25 16:35:59 -05:00
AndyG
e5664c45a5 Update pip.py (#47568)
adding the option to install pip modules via  proxy, as per https://github.com/ansible/ansible/issues/36333#issuecomment-366374083
2018-10-25 15:29:01 -04:00
Toshio Kuratomi
e5a245de94 Fix from sivel for ansible-doc
* Major slow down due to using the wrong loader for plugin_types
* traceback due to adding httpapi and cliconf plugins to the plugins we
allow ansible-doc to process
2018-10-25 12:06:18 -07:00
Jose Delarosa
1c37471274 Fix idempotency issues in set_bios_attributes
- Added check to see if attribute even exists, if not, it exits.
- Then checks if attribute is already set to value we want to update
  it to. If yes, then it exits and changed=False
- Otherwise updates the attribute and changed=True
2018-10-25 11:02:02 -04:00
Zim Kalinowski
1724b633f2
adding subnet service endpoints (#47549)
adding subnet service endpoints
2018-10-25 13:43:47 +08:00
Trishna Guha
d79b6c8406
fix trailing command in net_neighbors nxos_facts (#47548)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-10-25 10:13:38 +05:30
Abhijeet Kasurde
5f404eb0c1
VMware: Add tag facts to vmware_guest_facts (#47495)
Fixes: #46460

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-25 09:45:38 +05:30
Zim Kalinowski
5193e31886
adding mysql firewall rule facts (#47342)
* adding mysql firewall rule facts

* fixes
2018-10-25 10:10:12 +08:00
Zim Kalinowski
1cb78209ae
upgrading sql package to newest (#47544)
* upgrading sql package to newest

* LROPOller
2018-10-25 10:08:56 +08:00
Zim Kalinowski
4cda7a7883
upgrading rdbms to the latest version (#47547) 2018-10-25 09:55:00 +08:00
Yunge Zhu
1587bb9f65
fix webapp test (#47546) 2018-10-25 09:45:40 +08:00
abarbare
b4a9b29ab2 feat: add security_group to scaleway compute resource (#45699)
feat: add more tests
2018-10-24 22:33:40 +01:00
Hagen Kuehn
0661f2f213 adds 'success_msg' to valid args for assert module (#47030) 2018-10-24 21:10:10 +02:00
Johann Queuniet
74ce8ce935 Add API pagination support to Scaleway inventory (#46117)
* Add Scaleway API pagination to server inventory call

* Move Link parsing to helper module

* Correct some PEP8 errors

* Replace AnsibleError with ScalewayException in module_utils since the former doesn't work

* Simplify the regexes to match the intended purpose

* Cleanup helper to conform to review

* Cleanup Scaleway inventory to conform to review

* Flatten the conditional branches structure

* fix a regexp typo
2018-10-24 17:53:46 +01:00
FragmentedPacket
f83fa2ac93 Netbox inventory: Fix NoneType issue if query_filters is not in netbox_inventory.yml (#46793)
* Added if state to refresh_url to avoid failure at NoneType when guesry_filters is undefined in netbox_inventory.yml
2018-10-24 16:52:20 +01:00
Nathaniel Case
6a866a5e10
ios check_rc: Default to sending text of exception, not the whole exception (#47300)
* Default to sending text of exception, not the whole exception
2018-10-24 09:56:47 -04:00
Simon Dodsley
4420e4c3cd Bug fix for purefb_fs to stop incorrect filesystem eradication (#47561) 2018-10-24 09:42:42 -04:00
Florian Apolloner
ecdcb6a09f Changed django_manage to return changed as boolean consistently (#46157) 2018-10-24 12:56:37 +01:00
John Imison
5ba4e4411b Adding headers to be returned for retrieved messages. (#47375) 2018-10-24 12:38:32 +01:00
lolcube
eb7f6a5e62 Add openssh_keypair module (#46436)
* add openssh_keypair module
2018-10-24 11:51:45 +01:00
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>
2018-10-24 11:49:56 +01:00
Jan Christian Grünhage
01bee0c2d9 Add matrix notification module (#45823)
* Add matrix notification module

* try to make ansibot happy

* docs

* fix typo in encoding

* is ansibot happy now?

* change matrix python lib requirement description

* Example formatting & no_log

Thanks for this PR.
Few minor things that are easier for me to just fix, than explain and get you to fix.

* We suggest using `- name:` for examples, as Ansible best practice is to name your tasks
* To prevent secrets being leaked out use `no_log` in argspec
* use `requirements:` in `DOCUMENTATION`

* Clean up argument requirements

* Remove requirements duplicate

* not sure on syntax with these, were adapted from an example elsewhere
2018-10-24 08:54:38 +01:00
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
2018-10-24 10:40:54 +10:00
Simon Dodsley
8a88d78285 Add hard_limit support to Pure Strage FlashBlade filesystem module (#43987) 2018-10-23 19:03:17 -04:00
Jordan Borean
ddfd1dbfc6
Add helper function to return helpful import error msg (#47409) 2018-10-24 07:21:36 +10:00
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
2018-10-24 05:37:05 +10:00
He Guimin
85ba30a3db Add new module ali_instance (#36898) 2018-10-23 13:02:21 -05:00
Matthew DeNapoli
dc81a3b856 added in method to handle new and old login methods (#47170) 2018-10-23 13:19:31 -04:00
Adam Miller
079705f8da
dnf properly gpg check local packages based on param (#47455)
* dnf properly gpg check local packages based on param

Fixes #43624

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-23 11:41:27 -05:00
Adam Miller
0e3e646189
don't restrict disable_excludes choices incorrectly (#47453)
* don't restrict disable_excludes choices incorrectly

Fixes #47085

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-10-23 11:39:55 -05:00
Matt Martz
f6ecdf0b87
Handle sets differently than lists in wrap_var. Fixes #47372 (#47510) 2018-10-23 11:18:21 -05:00
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
2018-10-23 11:08:48 -05:00
Francisco Gray
8c456d8e38 - Moved data sanitization logic so it is no longer conditionally applied (#41405) 2018-10-23 09:38:52 -04:00
Dan
dcb35c4270 Fix nxos_ospf_vrf module auto-cost idempotency and module check mode (#47190)
* fixing idempotency and check mode

* modified to avoid repetitive code
2018-10-23 14:28:24 +05:30
Joey
6629f153d2 Fix minor typos (#47381) 2018-10-23 03:25:44 -04:00
Will Thames
00ccad9764 Use kubeconfig if either context or kubeconfig is set (#47373)
kubeconfig should be loaded if *either* or both of context
or kubeconfig is set (this allows picking a context and default
kubeconfig or picking a kubeconfig with default context)

Fixes #47149
2018-10-23 07:53:22 +01:00
Felix Fontein
a11073df9a docker_image: allow to delete image by ID (#47393)
* Allow to delete docker image by ID.

* Added changelog.
2018-10-23 07:52:36 +01:00
Felix Fontein
4ffe3b14d4 docker_container: warn if ipvX_address is used for networks but not supported by docker-py (#47395)
* Only add parameters which are actually used.

* Fail if ipvX_address is used when not supported.

* Added changelog.
2018-10-23 07:52:08 +01:00
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.
2018-10-23 07:51:24 +01:00
Dave Bendit
29b4b36501 Adding "internal" option to "docker_network" module (#35370)
Fixes #27065
2018-10-23 07:49:26 +01:00
Felix Fontein
8ef994fbc5 Fix option change detection / force support for docker_volume. (#47390) 2018-10-23 07:48:09 +01:00
Abhijeet Kasurde
6e5233b785
VMware: change type of state in vmware_host_ipv6 (#47362)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-23 11:37:34 +05:30
Valentin
2939f68897 Fix #33045: get existing network via inspect_network (Rebased #33048) (#43997) 2018-10-23 01:14:51 -04:00
Nijin Ashok
bc741eb2a0 ovirt_vm: Fix issue in setting the custom_compatibility_version to NULL
Currently there is no way to reset the custom_compatibility_version to
NULL. If we provide a empty string('') to custom_compatibility_version,
it will fail with error "IndexError: list index out of range" at _get_minor
function.

To reset the custom_compatibility_version, we have to pass None value to
types.Version. The PR fixes the same.
2018-10-22 21:12:08 -07:00
Ted Timmons
a0f58fa2ef AWS: docfix: spelling (#47443)
Fix spelling from paramaters to parameters
2018-10-23 09:36:39 +05:30
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
Toshio Kuratomi
9088671c4e Fix python3 problem in user module cve fix 2018-10-22 18:31:57 -07:00
Jordan Borean
d46d92eed5
Revert "WinRM/PSRP: Fix UTF-8 issue (#46998)" (#47447)
This reverts commit 1bb674034f.
2018-10-23 09:10:28 +10: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
7ec49d7472 interfaces_file: Add support for address_family 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
Peter Sprygada
9180d2c7f2 escape default prompt detection in telnet action plugin (#46573)
This change fixes an issue with the default prompt handling.  The value
needs to be escaped otherwise it does not work when converted to bytes.
2018-10-22 13:59:10 -04:00
Peter Sprygada
299a5e4af3 fix error checking if netns exists (#47397)
This patch fixes an error that occurs when attempting to see if the
netns already exists on the remote device.  This change will now execute
`ip netns list` and check if the desired namespace is in the output.

Signed-off-by: Peter Sprygada <psprygada@ansible.com>
2018-10-22 13:58:48 -04:00
Thomas (TJ) Zimmerman
a66d5ccf03 Fixed spelling error
<!--- Your description here -->

+label: docsite_pr
2018-10-22 19:00:53 +02: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
Sloane Hertel
c58c0b8547 [aws] Fix check mode bug in ec2_key (#45320)
Fix incorrect ec2_key check-mode behavior when a key already exists and key_material has been provided
2018-10-22 09:28:07 -04:00
Jonathan Oddy
7ba09adee1 Fix AWS EC2 inventory plugin caching of groups (#46961)
* Fix AWS EC2 inventory plugin caching of groups

* Added changelog fragment for aws_ec2 caching fix

* Store the AWS query results

The underlying inventory object contains inventory from other sources,
so caching it as ours would be wrong.
It seems easiest and safest to just cache the boto query results
instead.

* Remove unused functions
2018-10-22 09:15:27 -04:00
Trishna Guha
9c81634c77
nxos_file_copy fix for binary files (#46822)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-10-22 15:41:18 +05:30
cahlchang
6bd4665c4e add ec2_instance example docs (#47386)
* add ec2_instance example docs

* duplicate text
2018-10-22 08:11:31 +10:00
jfpanisset
fc516633a2 refresh_inventory doc typo (#47402)
Fix  typo in example for usage of refresh_inventory meta task
2018-10-22 07:59:24 +10:00
Dag Wieers
1bb674034f WinRM/PSRP: Fix UTF-8 issue (#46998)
* WinRM/PSRP: Fix UTF-8 issue

* added changelog fragment
2018-10-22 06:59:53 +10:00
Abhijeet Kasurde
cf2af97b78 rabbitmq_plugin: refactor logic (#46597)
* Docs update
* Example update
* Refactor logic

Fixes: #29196

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-21 16:14:25 -04:00
Dag Wieers
6f9c6071e5 psexec: Handle socket errors (Connection timeout) (#47201)
* psexec: Handle socket errors (Connection timeout)

This ensures we get a nicer error message from psexec.

* Add changelog fragment
2018-10-22 05:32:06 +10:00
Vipul Kanade
06d23019e7 VMware: Add check for timezone variable (windows customization) (#47135)
* vmware_guest.py: check if value for windows customization with timezone is integer, before proceeding.
2018-10-20 21:35:48 +05:30
Petr Ruzicka
0bb3205dee with_items should not be used any more - using loop instead (#47363) 2018-10-19 12:32:58 -07:00
hansmi
6c612c9e6c gluster_volume: Avoid error when deleting non-existent volume (#42097)
When a non-existent Gluster volume is to be deleted, i.e.:

  gluster_volume:
    state: absent
    name: vol1-does-not-exist

the "gluster_volume" module would always fail with "volume not found
vol1-does-not-exist". The reason is that the code checked whether the
state is "delete", a value which isn't accepted for the "state"
parameter. Instead the expected value for volume deletion is, as above,
"absent".
2018-10-19 15:16:05 -04:00
Eric Coulter
bc5af5a775 Update documentation for marker (#47292)
Using blockinfile with a custom marker lacking {mark} results in non-idempotency - block is repeatedly inserted on subsequent playbook runs. 

+label: docsite_pr
2018-10-19 14:31:03 -04:00
Martin Krizek
e8b6864e21 yum/dnf: fail when space separated string of names (#47109)
* yum/dnf: fail when space separated string of names

* Groups allow spaces in names
2018-10-19 14:29:27 -04:00
flowerysong
c21f92f8f7 Fix yum/dnf lock file polling (#47250) 2018-10-19 14:18:09 -04: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
Petr Ruzicka
6cd17401ec with_items should not be used any more - using loop instead (#47294) 2018-10-19 12:43:00 -04:00
Carsten Koester
04d3693e1f os_user_role: Include domain parameter in user lookup (#42913)
If a "domain" parameter is provided, use it in looking up the user ID.

Additionally, if both a domain and project parameter are provided, then
remove the domain ID from the list of filter criteria after having used
it to look up both the user and the project. OpenStack will not allow us
to apply both a project ID (which implies a domain) and a domain ID as a
search filter.

Fixes #42911
2018-10-19 12:16:19 -04:00
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
Daniel Shepherd
c67ab296bb pamd: add delete=False to NamedTemporaryFile() (#47281)
* add delete=False to NamedTemporaryFile and remove print statement from module

* add changelog fragment
2018-10-19 10:46:47 -04:00
Joey
c5a9b6acb7 Fix minor typos on variable names (#47165) 2018-10-19 10:44:34 -04:00
Allyson Bowles
21859c06b9 Add output for skipped tasks 2018-10-19 10:38:29 -04:00
Allyson Bowles
219f1b8380 Display output for loops on 'ok' result 2018-10-19 10:38:29 -04:00
Christian Kotte
dc2eb05491 VMware: Add check mode support to vmware_vmkernel_facts (#47286) 2018-10-19 19:24:34 +05:30
Abhijeet Kasurde
a47b055ac7 Update profile_tasks docs (#46690)
Added configuration settings to enable profile_tasks via ansible.cfg

Fixes: #44555

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-10-19 08:19:57 -05:00
Ondra Machacek
b177aff41b ovirt_vm: Fix initialization of cloud init (#47348)
Fixes: https://github.com/ansible/ansible/issues/45900

This PR fixes the case when the cloud_init_persist was used, but we
still sent use_cloud_init=False, which is in oVirt API evaluated as not
to use cloud_init in first VM execution. This patch is changing it to
send just None, instead of False.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
2018-10-19 09:13:29 -04:00