cs_staticnat: fix sanity (#46037)

This commit is contained in:
René Moser 2018-09-26 09:03:16 +02:00 committed by GitHub
parent c09b785a66
commit 7f92a8c94c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 28 deletions

View file

@ -1,22 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (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, 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,7 +15,7 @@ module: cs_staticnat
short_description: Manages static NATs on Apache CloudStack based clouds.
description:
- Create, update and remove static NATs.
version_added: '2.0'
version_added: "2.0"
author: "René Moser (@resmo)"
options:
ip_address:
@ -39,12 +25,10 @@ options:
vm:
description:
- Name of virtual machine which we make the static NAT for.
- Required if C(state=present).
- Required if I(state=present).
vm_guest_ip:
description:
- VM guest NIC secondary IP address for the static NAT.
type: bool
default: 'no'
network:
description:
- Network the IP address is related to.
@ -56,8 +40,8 @@ options:
state:
description:
- State of the static NAT.
default: 'present'
choices: [ 'present', 'absent' ]
default: present
choices: [ present, absent ]
domain:
description:
- Domain the static NAT is related to.
@ -75,19 +59,19 @@ options:
description:
- Poll async jobs until job has finished.
type: bool
default: 'yes'
default: yes
extends_documentation_fragment: cloudstack
'''
EXAMPLES = '''
# create a static NAT: 1.2.3.4 -> web01
- local_action:
- name: Create a static NAT for IP 1.2.3.4 to web01
local_action:
module: cs_staticnat
ip_address: 1.2.3.4
vm: web01
# remove a static NAT
- local_action:
- name: Remove a static NAT
local_action:
module: cs_staticnat
ip_address: 1.2.3.4
state: absent

View file

@ -167,7 +167,6 @@ lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E322
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E323
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E325
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E326
lib/ansible/modules/cloud/cloudstack/cs_staticnat.py E324
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E322
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E325
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E326