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