community.general.ce_aaa_server (0.1.1) — module

Manages AAA server global configuration on HUAWEI CloudEngine switches.

Authors: wangdezhuang (@QijunPan)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages AAA server global configuration on HUAWEI CloudEngine switches.

Usage examples

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

- name: AAA server test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: "Radius authentication Server Basic settings"
    ce_aaa_server:
      state: present
      authen_scheme_name: test1
      first_authen_mode: radius
      radius_server_group: test2
      provider: "{{ cli }}"

  - name: "Undo radius authentication Server Basic settings"
    ce_aaa_server:
      state: absent
      authen_scheme_name: test1
      first_authen_mode: radius
      radius_server_group: test2
      provider: "{{ cli }}"

  - name: "Hwtacacs accounting Server Basic settings"
    ce_aaa_server:
      state: present
      acct_scheme_name: test1
      accounting_mode: hwtacacs
      hwtacas_template: test2
      provider: "{{ cli }}"

  - name: "Undo hwtacacs accounting Server Basic settings"
    ce_aaa_server:
      state: absent
      acct_scheme_name: test1
      accounting_mode: hwtacacs
      hwtacas_template: test2
      provider: "{{ cli }}"

Inputs

    
state:
    choices:
    - absent
    - present
    default: present
    description:
    - Specify desired state of the resource.
    type: str

domain_name:
    description:
    - Name of a domain. The value is a string of 1 to 64 characters.
    type: str

accounting_mode:
    choices:
    - invalid
    - hwtacacs
    - radius
    - none
    default: none
    description:
    - Accounting Mode.
    type: str

acct_scheme_name:
    description:
    - Accounting scheme name. The value is a string of 1 to 32 characters.
    type: str

hwtacas_template:
    description:
    - Name of a HWTACACS template. The value is a string of 1 to 32 case-insensitive characters.
    type: str

local_user_group:
    description:
    - Name of the user group where the user belongs. The user inherits all the rights
      of the user group. The value is a string of 1 to 32 characters.
    type: str

first_authen_mode:
    choices:
    - invalid
    - local
    - hwtacacs
    - radius
    - none
    default: local
    description:
    - Preferred authentication mode.
    type: str

first_author_mode:
    choices:
    - invalid
    - local
    - hwtacacs
    - if-authenticated
    - none
    default: local
    description:
    - Preferred authorization mode.
    type: str

authen_scheme_name:
    description:
    - Name of an authentication scheme. The value is a string of 1 to 32 characters.
    type: str

author_scheme_name:
    description:
    - Name of an authorization scheme. The value is a string of 1 to 32 characters.
    type: str

radius_server_group:
    description:
    - RADIUS server group's name. The value is a string of 1 to 32 case-insensitive characters.
    type: str

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of aaa params after module execution
  returned: always
  sample:
    accounting scheme:
    - - hwtacacs
      - test1
    hwtacacs template:
    - huawei
    - test2
  type: dict
existing:
  description: k/v pairs of existing aaa server
  returned: always
  sample:
    accounting scheme:
    - - hwtacacs
    - - default
    hwtacacs template:
    - huawei
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    accounting_mode: hwtacacs
    acct_scheme_name: test1
    hwtacas_template: test2
    state: present
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - accounting-scheme test1
  - accounting-mode hwtacacs
  - hwtacacs server template test2
  - hwtacacs enable
  type: list