New in version 2.3.
Removed in Ansible: | |
---|---|
version: 2.9 | |
Why: | This module does not support AOS 2.1 or later |
Alternative: | See new modules at https://www.ansible.com/ansible-apstra. |
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
content |
Datastructure of the ASN Pool to manage. The data can be in YAML / JSON or directly a variable. It's the same datastructure that is returned on success in value.
|
|
id |
AOS Id of the ASN Pool to manage. Only one of name, id or content can be set.
|
|
name |
Name of the ASN Pool to manage. Only one of name, id or content can be set.
|
|
ranges |
List of ASNs ranges to add to the ASN Pool. Each range must have 2 values.
|
|
session
required |
An existing AOS session as obtained by aos_login module.
|
|
state |
|
Indicate what is the expected state of the ASN Pool (present or not).
|
- name: "Create ASN Pool"
aos_asn_pool:
session: "{{ aos_session }}"
name: "my-asn-pool"
ranges:
- [ 100, 200 ]
state: present
register: asnpool
- name: "Save ASN Pool into a file in JSON"
copy:
content: "{{ asnpool.value | to_nice_json }}"
dest: resources/asn_pool_saved.json
- name: "Save ASN Pool into a file in YAML"
copy:
content: "{{ asnpool.value | to_nice_yaml }}"
dest: resources/asn_pool_saved.yaml
- name: "Delete ASN Pool"
aos_asn_pool:
session: "{{ aos_session }}"
name: "my-asn-pool"
state: absent
- name: "Load ASN Pool from File(JSON)"
aos_asn_pool:
session: "{{ aos_session }}"
content: "{{ lookup('file', 'resources/asn_pool_saved.json') }}"
state: present
- name: "Delete ASN Pool from File(JSON)"
aos_asn_pool:
session: "{{ aos_session }}"
content: "{{ lookup('file', 'resources/asn_pool_saved.json') }}"
state: absent
- name: "Load ASN Pool from File(Yaml)"
aos_asn_pool:
session: "{{ aos_session }}"
content: "{{ lookup('file', 'resources/asn_pool_saved.yaml') }}"
state: present
register: test
- name: "Delete ASN Pool from File(Yaml)"
aos_asn_pool:
session: "{{ aos_session }}"
content: "{{ lookup('file', 'resources/asn_pool_saved.yaml') }}"
state: absent
This module is flagged as deprecated and will be removed in version 2.9. For more information see DEPRECATED.
Hint
If you notice any issues in this documentation you can edit this document to improve it.