From 6739578742f9e2ab125b6e7f8c25f11af3c2b4b0 Mon Sep 17 00:00:00 2001 From: Quentin Stafford-Fraser Date: Sun, 10 May 2015 22:07:49 +0100 Subject: [PATCH] Add examples. --- .../extras/cloud/webfaction/webfaction_app.py | 10 ++++++++++ .../cloud/webfaction/webfaction_domain.py | 20 +++++++++++++++++++ .../cloud/webfaction/webfaction_mailbox.py | 10 ++++++++++ 3 files changed, 40 insertions(+) diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py index 05b31f55a4a..20e94a7b5f6 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py @@ -63,6 +63,16 @@ options: required: true ''' +EXAMPLES = ''' + - name: Create a test app + webfaction_app: + name="my_wsgi_app1" + state=present + type=mod_wsgi35-python27 + login_name={{webfaction_user}} + login_password={{webfaction_passwd}} +''' + import xmlrpclib webfaction = xmlrpclib.ServerProxy('https://api.webfaction.com/') diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py index 8548c4fba37..c99a0f23f6d 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py @@ -47,6 +47,26 @@ options: required: true ''' +EXAMPLES = ''' + - name: Create a test domain + webfaction_domain: + name: mydomain.com + state: present + subdomains: + - www + - blog + login_name: "{{webfaction_user}}" + login_password: "{{webfaction_passwd}}" + + - name: Delete test domain and any subdomains + webfaction_domain: + name: mydomain.com + state: absent + login_name: "{{webfaction_user}}" + login_password: "{{webfaction_passwd}}" + +''' + import socket import xmlrpclib diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py index fee5700e50e..87ca1fd1a26 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py @@ -45,6 +45,16 @@ options: required: true ''' +EXAMPLES = ''' + - name: Create a mailbox + webfaction_mailbox: + mailbox_name="mybox" + mailbox_password="myboxpw" + state=present + login_name={{webfaction_user}} + login_password={{webfaction_passwd}} +''' + import socket import xmlrpclib