dellemc / dellemc.powerscale / 3.0.0 / module / subnet Manages subnet configuration on PowerScale | "added in version" 1.4.0 of dellemc.powerscale" Authors: Jennifer John (@johnj9) <ansible.team@dell.com>dellemc.powerscale.subnet (3.0.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==3.0.0
collections: - name: dellemc.powerscale version: 3.0.0
Manages the subnet configuration on the PowerScale storage system. This includes creating, modifying, deleting and retrieving the details of the subnet.
- name: Create a subnet dellemc.powerscale.subnet: onefs_host: "{{onefs_host}}" port_no: "{{port_no}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" groupnet_name: "groupnet_test" subnet_name: "subnet_test" description: "Test subnet" netmask: '198.10.**.***' gateway_priority: 1 subnet_params: gateway: '198.10.**.***' sc_service_addrs: - start_range: '198.10.**.***' end_range: '198.10.**.***' sc_service_addrs_state: "add" mtu: 1500 vlan_enabled: true vlan_id: 22 state: 'present'
- name: Modify a subnet dellemc.powerscale.subnet: onefs_host: "{{onefs_host}}" port_no: "{{port_no}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" groupnet_name: "groupnet_test" subnet_name: "subnet_test" description: "Test subnet" netmask: '198.10.**.***' gateway_priority: 2 subnet_params: gateway: '198.10.**.***' mtu: 1500 vlan_enabled: true vlan_id: 22 state: 'present'
- name: Rename a subnet dellemc.powerscale.subnet: onefs_host: "{{onefs_host}}" port_no: "{{port_no}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" groupnet_name: "groupnet_test" subnet_name: "subnet_test" new_subnet_name: "subnet_test_rename"
- name: Add smart connect service ip range to subnet dellemc.powerscale.subnet: onefs_host: "{{onefs_host}}" port_no: "{{port_no}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" groupnet_name: "groupnet_test" subnet_name: "subnet_test" subnet_params: sc_service_addrs: - start_range: '198.10.**.***' end_range: '198.10.**.***' sc_service_addrs_state: "add" state: 'present'
- name: Remove smart connect service ip range from subnet dellemc.powerscale.subnet: onefs_host: "{{onefs_host}}" port_no: "{{port_no}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" groupnet_name: "groupnet_test" subnet_name: "subnet_test" subnet_params: sc_service_addrs: - start_range: '198.10.**.***' end_range: '198.10.**.***' sc_service_addrs_state: "remove" state: 'present'
- name: Delete a subnet dellemc.powerscale.subnet: onefs_host: "{{onefs_host}}" port_no: "{{port_no}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" groupnet_name: "groupnet_test" subnet_name: "subnet_test" state: 'absent'
state: choices: - absent - present description: - The state of the subnet after the task is performed. - C(present) - indicates that the subnet should exist on the system. - C(absent) - indicates that the subnet should not exist on the system. required: true type: str netmask: description: Netmask of the subnet. type: str port_no: default: '8080' description: - Port number of the PowerScale cluster.It defaults to 8080 if not specified. required: false type: str api_user: description: - username of the PowerScale cluster. required: true type: str onefs_host: description: - IP address or FQDN of the PowerScale cluster. required: true type: str verify_ssl: choices: - true - false description: - boolean variable to specify whether to validate SSL certificate or not. - C(true) - indicates that the SSL certificate should be verified. - C(false) - indicates that the SSL certificate should not be verified. required: true type: bool description: description: A description of the subnet. type: str subnet_name: description: Name of the subnet. required: true type: str api_password: description: - the password of the PowerScale cluster. required: true type: str groupnet_name: description: Name of the groupnet. required: true type: str subnet_params: description: - Specify additional parameters to configure the subnet. suboptions: gateway: description: Gateway IP address. type: str mtu: description: MTU of the subnet. type: int sc_service_addrs: description: List of IP addresses that SmartConnect listens for DNS requests. elements: dict suboptions: end_range: description: - Specifies the end range for I(sc_service_addrs). required: true type: str start_range: description: - Specifies the start range for I(sc_service_addrs). required: true type: str type: list sc_service_addrs_state: choices: - add - remove description: Specifies if the I(sc_service_addrs) range need to be added or removed from the subnet. type: str vlan_enabled: description: VLAN tagging enabled or disabled type: bool vlan_id: description: VLAN ID for all interfaces in the subnet. type: int type: dict new_subnet_name: description: Name of the subnet when renaming an existing subnet. type: str gateway_priority: description: Gateway priority. type: int
changed: description: Whether or not the resource has changed. returned: always type: bool subnet_details: contains: addr_family: description: IP address format. type: str groupnet: description: Name of the groupnet this subnet belongs to. type: str id: description: Unique subnet id. type: str mtu: description: MTU of the subnet. type: int name: description: The name of the subnet. type: str pools: description: List of names of pools in the subnet. type: list prefixlen: description: Subnet prefix length. type: int sc_service_addr: description: The address that SmartConnect listens for DNS requests. type: list description: Subnet details. returned: When a subnet exists sample: addr_family: ipv4 base_addr: 10.**.**.* description: Initial subnet dsr_addrs: [] gateway: 10.**.**.** gateway_priority: 10 groupnet: groupnet0 id: groupnet0.subnet0 mtu: 1500 name: subnet0 pools: - pool0 prefixlen: 21 sc_service_addrs: [] sc_service_name: '' vlan_enabled: false vlan_id: null type: complex