@ -4,14 +4,18 @@
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import , division , print_function
__metaclass__ = type
ANSIBLE_METADATA = { ' metadata_version ' : ' 1.1 ' ,
' status ' : [ ' preview ' ] ,
' supported_by ' : ' community ' }
DOCUMENTATION = '''
DOCUMENTATION = r '''
- - -
module : bigip_partition
short_description : Manage BIG - IP partitions .
short_description : Manage BIG - IP partitions
description :
- Manage BIG - IP partitions .
version_added : " 2.5 "
@ -42,53 +46,53 @@ author:
- Tim Rupp ( @caphrim007 )
'''
EXAMPLES = '''
EXAMPLES = r '''
- name : Create partition " foo " using the default route domain
bigip_partition :
name : " foo "
password : " secret "
server : " lb.mydomain.com "
user : " admin "
name : foo
password : secret
server : lb . mydomain . com
user : admin
delegate_to : localhost
- name : Create partition " bar " using a custom route domain
bigip_partition :
name : " bar "
name : bar
route_domain : 3
password : " secret "
server : " lb.mydomain.com "
user : " admin "
password : secret
server : lb . mydomain . com
user : admin
delegate_to : localhost
- name : Change route domain of partition " foo "
bigip_partition :
name : " foo "
name : foo
route_domain : 8
password : " secret "
server : " lb.mydomain.com "
user : " admin "
password : secret
server : lb . mydomain . com
user : admin
delegate_to : localhost
- name : Set a description for partition " foo "
bigip_partition :
name : " foo "
description : " Tenant CompanyA "
password : " secret "
server : " lb.mydomain.com "
user : " admin "
name : foo
description : Tenant CompanyA
password : secret
server : lb . mydomain . com
user : admin
delegate_to : localhost
- name : Delete the " foo " partition
bigip_partition :
name : " foo "
password : " secret "
server : " lb.mydomain.com "
user : " admin "
state : " absent "
name : foo
password : secret
server : lb . mydomain . com
user : admin
state : absent
delegate_to : localhost
'''
RETURN = '''
RETURN = r '''
route_domain :
description : Name of the route domain associated with the partition .
returned : changed and success
@ -98,14 +102,14 @@ description:
description : The description of the partition .
returned : changed and success
type : string
sample : " Example partition "
sample : Example partition
'''
from ansible . module_utils . f5_utils import AnsibleF5Client
from ansible . module_utils . f5_utils import AnsibleF5Parameters
from ansible . module_utils . f5_utils import F5ModuleError
from ansible . module_utils . f5_utils import iteritems
from ansible. module_utils . f5_util s import defaultdict
from ansible . module_utils . six import iteritems
from collection s import defaultdict
try :
from ansible . module_utils . f5_utils import HAS_F5SDK