Deprecated

Removed in 2.9

i

Reason:This module does not support AOS 2.1 or later | Alternative:See new modules at U(https://www.ansible.com/ansible-apstra).

ansible.builtin._aos_login (v2.8.20) — module

Login to AOS server for session token

| "added in version" 2.3 of ansible.builtin"

Authors: jeremy@apstra.com (@jeremyschulman)

deprecated | supported by community

Install Ansible via pip

Install with pip install ansible==2.8.20

Description

Obtain the AOS server session token by providing the required username and password credentials. Upon successful authentication, this module will return the session-token that is required by all subsequent AOS module usage. On success the module will automatically populate ansible facts with the variable I(aos_session) This module is not idempotent and do not support check mode.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Create a session with the AOS-server
  aos_login:
    server: "{{ inventory_hostname }}"
    user: admin
    passwd: admin
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Use the newly created session (register is not mandatory)
  aos_ip_pool:
    session: "{{ aos_session }}"
    name: my_ip_pool
    state: present

Inputs

    
port:
    default: 443
    description:
    - Port number to use when connecting to the AOS server.

user:
    default: admin
    description:
    - Login username to use when connecting to the AOS server.

passwd:
    default: admin
    description:
    - Password to use when connecting to the AOS server.

server:
    description:
    - Address of the AOS Server on which you want to open a connection.
    required: true