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 |
---|---|---|
asn
|
|
ASN id of the external_router.
|
content
|
|
Datastructure of the External Router to create. The format is defined by the content_format parameter. It's the same datastructure that is returned on success in value.
|
id
|
|
AOS Id of the External Router to manage (can't be used to create a new External Router), Only one of name, id or content can be set.
|
loopback
|
|
IP address of the Loopback interface of the external_router.
|
name
|
|
Name of the External Router to manage. Only one of name, id or content can be set.
|
session
required |
|
An existing AOS session as obtained by aos_login module.
|
state
|
|
Indicate what is the expected state of the External Router (present or not).
|
- name: "Create an External Router"
aos_external_router:
session: "{{ aos_session }}"
name: "my-external-router"
loopback: 10.0.0.1
asn: 65000
state: present
- name: "Check if an External Router exist by ID"
aos_external_router:
session: "{{ aos_session }}"
name: "45ab26fc-c2ed-4307-b330-0870488fa13e"
state: present
- name: "Delete an External Router by name"
aos_external_router:
session: "{{ aos_session }}"
name: "my-external-router"
state: absent
- name: "Delete an External Router by id"
aos_external_router:
session: "{{ aos_session }}"
id: "45ab26fc-c2ed-4307-b330-0870488fa13e"
state: absent
# Save an External Router to a file
- name: "Access External Router 1/3"
aos_external_router:
session: "{{ aos_session }}"
name: "my-external-router"
state: present
register: external_router
- name: "Save External Router into a file in JSON 2/3"
copy:
content: "{{ external_router.value | to_nice_json }}"
dest: external_router_saved.json
- name: "Save External Router into a file in YAML 3/3"
copy:
content: "{{ external_router.value | to_nice_yaml }}"
dest: external_router_saved.yaml
- name: "Load External Router from a JSON file"
aos_external_router:
session: "{{ aos_session }}"
content: "{{ lookup('file', 'resources/external_router_saved.json') }}"
state: present
- name: "Load External Router from a YAML file"
aos_external_router:
session: "{{ aos_session }}"
content: "{{ lookup('file', 'resources/external_router_saved.yaml') }}"
state: present
This module is flagged as deprecated and will be removed in version { deprecated[‘removed_in’] | default(‘’) | string | convert_symbols_to_format }@. For more information see DEPRECATED.
Hint
If you notice any issues in this documentation you can edit this document to improve it.