aci_bd_subnet – Manage Subnets (fv:Subnet)¶
New in version 2.4.
Parameters¶
Notes¶
Note
- The
gateway
parameter is the root key used to access the Subnet (not name), so thegateway
is required when the state isabsent
orpresent
. - The
tenant
andbd
used must exist before using this module in your playbook. The aci_tenant module and aci_bd can be used for these.
See Also¶
See also
- aci_bd – Manage Bridge Domains (BD) objects (fv:BD)
- The official documentation on the aci_bd module.
- aci_tenant – Manage tenants (fv:Tenant)
- The official documentation on the aci_tenant module.
- APIC Management Information Model reference
- More information about the internal APIC class fv:Subnet.
- Cisco ACI ガイド
- Detailed information on how to manage your ACI infrastructure using Ansible.
- Cisco ACI モジュールの開発
- Detailed guide on how to write your own Cisco ACI modules to contribute.
Examples¶
- name: Create a tenant
aci_tenant:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
state: present
delegate_to: localhost
- name: Create a bridge domain
aci_bd:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
bd: database
state: present
delegate_to: localhost
- name: Create a subnet
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
bd: database
gateway: 10.1.1.1
mask: 24
state: present
delegate_to: localhost
- name: Create a subnet with options
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
bd: database
subnet_name: sql
gateway: 10.1.2.1
mask: 23
description: SQL Servers
scope: public
route_profile_l3_out: corp
route_profile: corp_route_profile
state: present
delegate_to: localhost
- name: Update a subnets scope to private and shared
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
bd: database
gateway: 10.1.1.1
mask: 24
scope: [private, shared]
state: present
delegate_to: localhost
- name: Get all subnets
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
state: query
delegate_to: localhost
- name: Get all subnets of specific gateway in specified tenant
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
gateway: 10.1.1.1
mask: 24
state: query
delegate_to: localhost
register: query_result
- name: Get specific subnet
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
bd: database
gateway: 10.1.1.1
mask: 24
state: query
delegate_to: localhost
register: query_result
- name: Delete a subnet
aci_bd_subnet:
host: apic
username: admin
password: SomeSecretPassword
tenant: production
bd: database
gateway: 10.1.1.1
mask: 24
state: absent
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by an Ansible Partner. [certified]
Authors¶
- Jacob McGill (@jmcgill298)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.