summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Moser <mail@renemoser.net>2018-03-07 14:15:39 +0100
committerJohn R Barker <john@johnrbarker.com>2018-03-07 13:15:39 +0000
commit67d8c8f5c6b70ab305cfca66a3fd8d7082ef6264 (patch)
tree0253db5fa04439d6b95a46bbd13900e56876c61b
parentff28429e2a39bb1696e629205b6087c7c5ae1988 (diff)
downloadansible-67d8c8f5c6b70ab305cfca66a3fd8d7082ef6264.tar.gz
cs_ip_address.py: fix missing doc (#37109)
* cs_ip_address.py: fix missing doc * update ignore.txt
-rw-r--r--lib/ansible/modules/cloud/cloudstack/cs_ip_address.py55
-rw-r--r--test/sanity/validate-modules/ignore.txt4
2 files changed, 16 insertions, 43 deletions
diff --git a/lib/ansible/modules/cloud/cloudstack/cs_ip_address.py b/lib/ansible/modules/cloud/cloudstack/cs_ip_address.py
index ec94c93fcc..e2259b1df0 100644
--- a/lib/ansible/modules/cloud/cloudstack/cs_ip_address.py
+++ b/lib/ansible/modules/cloud/cloudstack/cs_ip_address.py
@@ -1,23 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
-# (c) 2015, Darren Worrall <darren@iweb.co.uk>
-# (c) 2015, René Moser <mail@renemoser.net>
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright (c) 2015, Darren Worrall <darren@iweb.co.uk>
+# Copyright (c) 2015, René Moser <mail@renemoser.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
@@ -29,8 +15,8 @@ DOCUMENTATION = '''
module: cs_ip_address
short_description: Manages public IP address associations on Apache CloudStack based clouds.
description:
- - Acquires and associates a public IP to an account or project. Due to API
- limitations this is not an idempotent call, so be sure to only
+ - Acquires and associates a public IP to an account or project.
+ - Due to API limitations this is not an idempotent call, so be sure to only
conditionally call this when C(state=present)
version_added: '2.0'
author:
@@ -41,58 +27,49 @@ options:
description:
- Public IP address.
- Required if C(state=absent)
- required: false
- default: null
domain:
description:
- Domain the IP address is related to.
- required: false
- default: null
network:
description:
- Network the IP address is related to.
- required: false
- default: null
vpc:
description:
- VPC the IP address is related to.
- required: false
- default: null
version_added: "2.2"
account:
description:
- Account the IP address is related to.
- required: false
- default: null
project:
description:
- Name of the project the IP address is related to.
- required: false
- default: null
zone:
description:
- Name of the zone in which the IP address is in.
- If not set, default zone is used.
- required: false
- default: null
+ state:
+ description:
+ - State of the IP address.
+ default: present
+ choices: [ present, absent ]
poll_async:
description:
- Poll async jobs until job has finished.
- required: false
- default: true
+ default: yes
+ type: bool
extends_documentation_fragment: cloudstack
'''
EXAMPLES = '''
-# Associate an IP address conditonally
-- local_action:
+- name: Associate an IP address conditonally
+ local_action:
module: cs_ip_address
network: My Network
register: ip_address
when: instance.public_ip is undefined
-# Disassociate an IP address
-- local_action:
+- name: Disassociate an IP address
+ local_action:
module: cs_ip_address
ip_address: 1.2.3.4
state: absent
diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt
index a40bf3532f..dd69f3a72c 100644
--- a/test/sanity/validate-modules/ignore.txt
+++ b/test/sanity/validate-modules/ignore.txt
@@ -368,10 +368,6 @@ lib/ansible/modules/cloud/cloudstack/cs_instance.py E325
lib/ansible/modules/cloud/cloudstack/cs_instance.py E326
lib/ansible/modules/cloud/cloudstack/cs_instance_nic.py E325
lib/ansible/modules/cloud/cloudstack/cs_instance_nic_secondaryip.py E325
-lib/ansible/modules/cloud/cloudstack/cs_ip_address.py E322
-lib/ansible/modules/cloud/cloudstack/cs_ip_address.py E324
-lib/ansible/modules/cloud/cloudstack/cs_ip_address.py E325
-lib/ansible/modules/cloud/cloudstack/cs_ip_address.py E326
lib/ansible/modules/cloud/cloudstack/cs_iso.py E323
lib/ansible/modules/cloud/cloudstack/cs_iso.py E325
lib/ansible/modules/cloud/cloudstack/cs_loadbalancer_rule.py E322