diff --git a/lib/ansible/modules/extras/cloud/lxc/lxc_container.py b/lib/ansible/modules/extras/cloud/lxc/lxc_container.py index fd5daf1c47..6c177552d6 100644 --- a/lib/ansible/modules/extras/cloud/lxc/lxc_container.py +++ b/lib/ansible/modules/extras/cloud/lxc/lxc_container.py @@ -1684,7 +1684,7 @@ def main(): type='str' ), container_log=dict( - choices=BOOLEANS, + type='bool', default='false' ), container_log_level=dict( @@ -1696,11 +1696,11 @@ def main(): required=False ), clone_snapshot=dict( - choices=BOOLEANS, + type='bool', default='false' ), archive=dict( - choices=BOOLEANS, + type='bool', default='false' ), archive_path=dict( diff --git a/lib/ansible/modules/extras/cloud/misc/proxmox.py b/lib/ansible/modules/extras/cloud/misc/proxmox.py index 7be4361edb..e5a7e0b15d 100644 --- a/lib/ansible/modules/extras/cloud/misc/proxmox.py +++ b/lib/ansible/modules/extras/cloud/misc/proxmox.py @@ -273,7 +273,7 @@ def main(): api_user = dict(required=True), api_password = dict(no_log=True), vmid = dict(required=True), - validate_certs = dict(type='bool', choices=BOOLEANS, default='no'), + validate_certs = dict(type='bool', default='no'), node = dict(), password = dict(no_log=True), hostname = dict(), @@ -284,13 +284,13 @@ def main(): swap = dict(type='int', default=0), netif = dict(), ip_address = dict(), - onboot = dict(type='bool', choices=BOOLEANS, default='no'), + onboot = dict(type='bool', default='no'), storage = dict(default='local'), cpuunits = dict(type='int', default=1000), nameserver = dict(), searchdomain = dict(), timeout = dict(type='int', default=30), - force = dict(type='bool', choices=BOOLEANS, default='no'), + force = dict(type='bool', default='no'), state = dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']), ) ) diff --git a/lib/ansible/modules/extras/cloud/misc/proxmox_template.py b/lib/ansible/modules/extras/cloud/misc/proxmox_template.py index 7fed47f726..6434e59be2 100644 --- a/lib/ansible/modules/extras/cloud/misc/proxmox_template.py +++ b/lib/ansible/modules/extras/cloud/misc/proxmox_template.py @@ -156,14 +156,14 @@ def main(): api_host = dict(required=True), api_user = dict(required=True), api_password = dict(no_log=True), - validate_certs = dict(type='bool', choices=BOOLEANS, default='no'), + validate_certs = dict(type='bool', default='no'), node = dict(), src = dict(), template = dict(), content_type = dict(default='vztmpl', choices=['vztmpl','iso']), storage = dict(default='local'), timeout = dict(type='int', default=30), - force = dict(type='bool', choices=BOOLEANS, default='no'), + force = dict(type='bool', default='no'), state = dict(default='present', choices=['present', 'absent']), ) ) diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py index 1c015a401d..52ecedf438 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py @@ -112,9 +112,9 @@ def main(): name = dict(required=True), state = dict(required=False, choices=['present', 'absent'], default='present'), type = dict(required=True), - autostart = dict(required=False, choices=BOOLEANS, default=False), + autostart = dict(required=False, type='bool', default=False), extra_info = dict(required=False, default=""), - port_open = dict(required=False, choices=BOOLEANS, default=False), + port_open = dict(required=False, type='bool', default=False), login_name = dict(required=True), login_password = dict(required=True), machine = dict(required=False, default=False), diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py index bb1bfb9445..0226a2a2f9 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py @@ -112,7 +112,7 @@ def main(): state = dict(required=False, choices=['present', 'absent'], default='present'), # You can specify an IP address or hostname. host = dict(required=True), - https = dict(required=False, choices=BOOLEANS, default=False), + https = dict(required=False, type='bool', default=False), subdomains = dict(required=False, default=[]), site_apps = dict(required=False, default=[]), login_name = dict(required=True), diff --git a/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py b/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py index 53c7c675e9..55440524b6 100644 --- a/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py +++ b/lib/ansible/modules/extras/messaging/rabbitmq_exchange.py @@ -100,10 +100,10 @@ def main(): login_host = dict(default='localhost', type='str'), login_port = dict(default='15672', type='str'), vhost = dict(default='/', type='str'), - durable = dict(default=True, choices=BOOLEANS, type='bool'), - autoDelete = dict(default=False, choices=BOOLEANS, type='bool'), - internal = dict(default=False, choices=BOOLEANS, type='bool'), - exchangeType = dict(default='direct', aliases=['type'], type='str'), + durable = dict(default=True, type='bool'), + auto_delete = dict(default=False, type='bool'), + internal = dict(default=False, type='bool'), + exchange_type = dict(default='direct', aliases=['type'], type='str'), arguments = dict(default=dict(), type='dict') ), supports_check_mode = True diff --git a/lib/ansible/modules/extras/messaging/rabbitmq_queue.py b/lib/ansible/modules/extras/messaging/rabbitmq_queue.py index 983b2c452a..c8133c1894 100644 --- a/lib/ansible/modules/extras/messaging/rabbitmq_queue.py +++ b/lib/ansible/modules/extras/messaging/rabbitmq_queue.py @@ -114,13 +114,13 @@ def main(): login_host = dict(default='localhost', type='str'), login_port = dict(default='15672', type='str'), vhost = dict(default='/', type='str'), - durable = dict(default=True, choices=BOOLEANS, type='bool'), - autoDelete = dict(default=False, choices=BOOLEANS, type='bool'), - messageTTL = dict(default=None, type='int'), - autoExpire = dict(default=None, type='int'), - maxLength = dict(default=None, type='int'), - deadLetterExchange = dict(default=None, type='str'), - deadLetterRoutingKey = dict(default=None, type='str'), + durable = dict(default=True, type='bool'), + auto_delete = dict(default=False, type='bool'), + message_ttl = dict(default=None, type='int'), + auto_expires = dict(default=None, type='int'), + max_length = dict(default=None, type='int'), + dead_letter_exchange = dict(default=None, type='str'), + dead_letter_routing_key = dict(default=None, type='str'), arguments = dict(default=dict(), type='dict') ), supports_check_mode = True diff --git a/lib/ansible/modules/extras/monitoring/datadog_monitor.py b/lib/ansible/modules/extras/monitoring/datadog_monitor.py index 9318326620..474d2e4209 100644 --- a/lib/ansible/modules/extras/monitoring/datadog_monitor.py +++ b/lib/ansible/modules/extras/monitoring/datadog_monitor.py @@ -144,12 +144,12 @@ def main(): query=dict(required=False), message=dict(required=False, default=None), silenced=dict(required=False, default=None, type='dict'), - notify_no_data=dict(required=False, default=False, choices=BOOLEANS), + notify_no_data=dict(required=False, default=False, type='bool'), no_data_timeframe=dict(required=False, default=None), timeout_h=dict(required=False, default=None), renotify_interval=dict(required=False, default=None), escalation_message=dict(required=False, default=None), - notify_audit=dict(required=False, default=False, choices=BOOLEANS), + notify_audit=dict(required=False, default=False, type='bool'), thresholds=dict(required=False, type='dict', default={'ok': 1, 'critical': 1, 'warning': 1}), ) ) diff --git a/lib/ansible/modules/extras/packaging/os/apk.py b/lib/ansible/modules/extras/packaging/os/apk.py index ec0e3908fa..191f3b39b0 100644 --- a/lib/ansible/modules/extras/packaging/os/apk.py +++ b/lib/ansible/modules/extras/packaging/os/apk.py @@ -177,8 +177,8 @@ def main(): argument_spec = dict( state = dict(default='present', choices=['present', 'installed', 'absent', 'removed', 'latest']), name = dict(type='list'), - update_cache = dict(default='no', choices=BOOLEANS, type='bool'), - upgrade = dict(default='no', choices=BOOLEANS, type='bool'), + update_cache = dict(default='no', type='bool'), + upgrade = dict(default='no', type='bool'), ), required_one_of = [['name', 'update_cache', 'upgrade']], supports_check_mode = True diff --git a/lib/ansible/modules/extras/packaging/os/pkg5.py b/lib/ansible/modules/extras/packaging/os/pkg5.py index 686824fa19..c74b0fa5d8 100644 --- a/lib/ansible/modules/extras/packaging/os/pkg5.py +++ b/lib/ansible/modules/extras/packaging/os/pkg5.py @@ -77,9 +77,9 @@ def main(): ] ), accept_licenses=dict( - choices=BOOLEANS, - default=False - aliases=['accept_licences', 'accept'] + type='bool', + default=False, + aliases=['accept_licences', 'accept'], ), ) ) diff --git a/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py b/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py index e283ca200f..75c43c6c78 100644 --- a/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py +++ b/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py @@ -76,8 +76,8 @@ def main(): argument_spec=dict( name=dict(required=True, aliases=['publisher']), state=dict(default='present', choices=['present', 'absent']), - sticky=dict(choices=BOOLEANS), - enabled=dict(choices=BOOLEANS), + sticky=dict(type='bool'), + enabled=dict(type='bool'), # search_after=dict(), # search_before=dict(), origin=dict(type='list'), diff --git a/lib/ansible/modules/extras/system/osx_defaults.py b/lib/ansible/modules/extras/system/osx_defaults.py index e5d2bc5173..632082b030 100644 --- a/lib/ansible/modules/extras/system/osx_defaults.py +++ b/lib/ansible/modules/extras/system/osx_defaults.py @@ -309,7 +309,7 @@ def main(): array_add=dict( default=False, required=False, - choices=BOOLEANS, + type='bool', ), value=dict( default=None, diff --git a/lib/ansible/modules/extras/system/svc.py b/lib/ansible/modules/extras/system/svc.py index 6824569eb9..ea470beaa0 100644 --- a/lib/ansible/modules/extras/system/svc.py +++ b/lib/ansible/modules/extras/system/svc.py @@ -240,8 +240,8 @@ def main(): argument_spec = dict( name = dict(required=True), state = dict(choices=['started', 'stopped', 'restarted', 'killed', 'reloaded', 'once']), - enabled = dict(required=False, type='bool', choices=BOOLEANS), - downed = dict(required=False, type='bool', choices=BOOLEANS), + enabled = dict(required=False, type='bool'), + downed = dict(required=False, type='bool'), dist = dict(required=False, default='daemontools'), service_dir = dict(required=False, default='/service'), service_src = dict(required=False, default='/etc/service'),