Tidying of webfaction modules

This commit is contained in:
Quentin Stafford-Fraser 2015-05-03 23:48:51 +01:00 committed by Matt Clay
commit 3f715dc954
5 changed files with 23 additions and 30 deletions

View file

@ -13,7 +13,7 @@ short_description: Add or remove applications on a Webfaction host
description:
- Add or remove applications on a Webfaction host. Further documentation at http://github.com/quentinsf/ansible-webfaction.
author: Quentin Stafford-Fraser
version_added: 1.99
version_added: 2.0
notes:
- "You can run playbooks that use this on a local machine, or on a Webfaction host, or elsewhere, since the scripts use the remote webfaction API - the location is not important. However, running them on multiple hosts I(simultaneously) is best avoided. If you don't specify I(localhost) as your host, you may want to add C(serial: 1) to the plays."
- See `the webfaction API <http://docs.webfaction.com/xmlrpc-api/>`_ for more info.
@ -23,7 +23,6 @@ options:
description:
- The name of the application
required: true
default: null
state:
description:
@ -65,7 +64,6 @@ options:
'''
import xmlrpclib
from ansible.module_utils.basic import *
webfaction = xmlrpclib.ServerProxy('https://api.webfaction.com/')
@ -73,12 +71,12 @@ def main():
module = AnsibleModule(
argument_spec = dict(
name = dict(required=True, default=None),
name = dict(required=True),
state = dict(required=False, default='present'),
type = dict(required=True),
autostart = dict(required=False, choices=BOOLEANS, default='false'),
autostart = dict(required=False, choices=BOOLEANS, default=False),
extra_info = dict(required=False, default=""),
port_open = dict(required=False, default="false"),
port_open = dict(required=False, choices=BOOLEANS, default=False),
login_name = dict(required=True),
login_password = dict(required=True),
),
@ -148,6 +146,6 @@ def main():
result = result
)
# The conventional ending
from ansible.module_utils.basic import *
main()