merou.port.logs (1.1.0) — module

Send logs to Port

Authors: Merou

Install collection

Install with ansible-galaxy collection install merou.port:==1.1.0


Add to requirements.yml

  collections:
    - name: merou.port
      version: 1.1.0

Description

Simple callback to Port API log Stream for a specific run.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Report to Port
  merou_port_logs:
    client_id: "{{ port_client_id }}"
    client_secret: "{{ port_client_secret }}"
    run_id: r_W1djMSQ2iVGWVnkk
    message: "Applying permissions to DB"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Report status to Port
  merou_port_logs:
    client_id: "{{ port_client_id }}"
    client_secret: "{{ port_client_secret }}"
    run_id: r_W1djMSQ2iVGWVnkk
    message: "We are done here"
    status: "success"

Inputs

    
run_id:
    description: ID of the run provided by Port's API.
    required: true
    type: string

status:
    choices:
    - success
    - failure
    description: Status of a run.
    required: false
    type: string

message:
    description: Message appearing in Port Log Stream for specific run_id.
    required: true
    type: string

client_id:
    description: Your Client ID from Port Credentials.
    required: true
    type: string

api_version:
    default: v1
    description: Port API version.
    required: false
    type: string

client_secret:
    description: Your Client Secret from Port Credentials.
    required: true
    type: string