sensu.sensu_go.asset (0.7.8) — module

Manages Sensu assets

| "added in version" 0.1.0 of sensu.sensu_go"

Authors: Cameron Hurst (@wakemaster39), Aljaz Kosir (@aljazkosir), Miha Plesko (@miha-plesko), Tadej Borovsak (@tadeboro)

preview | supported by XLAB Steampunk

Install collection

Install with ansible-galaxy collection install sensu.sensu_go:==0.7.8


Add to requirements.yml

  collections:
    - name: sensu.sensu_go
      version: 0.7.8

Description

For more information, refer to the Sensu documentation at U(https://docs.sensu.io/sensu-go/latest/reference/assets/)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create asset
  asset:
    name: asset
    url: https://assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_centos_linux_amd64.tar.gz
    sha512: 518e7c17cf670393045bff4af318e1d35955bfde166e9ceec2b469109252f79043ed133241c4dc96501b6636a1ec5e008ea9ce055d1609865635d4f004d7187b
    filters:
      - "entity.system.os == 'linux'"
      - "entity.system.arch == 'amd64'"
      - "entity.system.platform == 'rhel'"
    annotations:
      sensio.io.bonsai.url: https://assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_centos_linux_amd64.tar.gz
      sensio.io.bonsai.tier: Community
      sensio.io.bonsai.version: 4.0.0
      sensio.io.bonsai.tags: ruby-runtime-2.4.4

Inputs

    
url:
    description:
    - The URL location of the asset.
    type: str

auth:
    description:
    - Authentication parameters. Can define each of them with ENV as well.
    suboptions:
      namespace:
        default: default
        description:
        - RBAC namespace to operate in. If this is not set the value of the SENSU_NAMESPACE
          environment variable will be checked.
        type: str
      password:
        default: P@ssw0rd!
        description:
        - The Sensu user's password. If this is not set the value of the SENSU_PASSWORD
          environment variable will be checked.
        type: str
      url:
        default: http://localhost:8080
        description:
        - Location of the Sensu backend API. If this is not set the value of the SENSU_URL
          environment variable will be checked.
        type: str
      user:
        default: admin
        description:
        - The username to use for connecting to the Sensu API. If this is not set the
          value of the SENSU_USER environment variable will be checked.
        type: str
    type: dict

name:
    description:
    - The Sensu object's name.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Target state of the Sensu object.
    type: str

labels:
    description:
    - Custom metadata fields that can be accessed within Sensu, as key/value pairs.
    type: dict

sha512:
    description:
    - The checksum of the asset.
    type: str

filters:
    description:
    - A set of Sensu query expressions used to determine if the asset should be installed.
    type: list

headers:
    description:
    - Additional headers to send when retrieving the asset, e.g. for authorization.
    type: dict

annotations:
    description:
    - Custom metadata fields with fewer restrictions, as key/value pairs.
    - These are preserved by Sensu but not accessible as tokens or identifiers, and are
      mainly intended for use with external tools.
    type: dict

Outputs

object:
  description: object representing Sensu asset
  returned: success
  type: dict