community.general.pn_log_audit_exception (0.1.1) — module

CLI command to create/delete an audit exception

Authors: Pluribus Networks (@rajaspachipulusu17)

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

This module can be used to create an audit exception and delete an audit exception.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create a log-audit-exception
  pn_log_audit_exception:
    pn_audit_type: "cli"
    pn_pattern: "test"
    state: "present"
    pn_access: "any"
    pn_scope: "local"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete a log-audit-exception
  pn_log_audit_exception:
    pn_audit_type: "shell"
    pn_pattern: "test"
    state: "absent"
    pn_access: "any"

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - State the action to perform. Use 'present' to create audit-exception and 'absent'
      to delete audit-exception.
    required: false
    type: str

pn_scope:
    choices:
    - local
    - fabric
    description:
    - scope - local or fabric.
    required: false
    type: str

pn_access:
    choices:
    - any
    - read-only
    - read-write
    description:
    - Specify the access type to match exceptions.
    required: true
    type: str

pn_pattern:
    description:
    - Specify a regular expression to match exceptions.
    required: false
    type: str

pn_cliswitch:
    description:
    - Target switch to run the CLI on.
    required: false
    type: str

pn_audit_type:
    choices:
    - cli
    - shell
    - vtysh
    description:
    - Specify the type of audit exception.
    required: false
    type: str

Outputs

changed:
  description: indicates whether the CLI caused changes on the target.
  returned: always
  type: bool
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stderr:
  description: set of error responses from the log_audit_exceptions command.
  returned: on error
  type: list
stdout:
  description: set of responses from the pn_log_audit_exceptions command.
  returned: always
  type: list