sensu.sensu_go.package_name filter – Format package name

Note

This filter plugin is part of the sensu.sensu_go collection (version 1.14.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install sensu.sensu_go.

To use it in a playbook, specify: sensu.sensu_go.package_name.

Note

The sensu.sensu_go collection will be removed from Ansible 12 due to violations of the Ansible inclusion requirements. The collection has unresolved sanity test failures. See the discussion thread for more information.

New in sensu.sensu_go 1.13.2

Synopsis

  • Package name format function.

  • The return value is a string respresenting package name and build version.

Input

This describes the input of the filter, the value before | sensu.sensu_go.package_name.

Parameter

Comments

Input

string / required

Package type.

Choices:

  • "apt"

  • "yum"

Keyword parameters

This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following example: input | sensu.sensu_go.package_name(key1=value1, key2=value2, ...)

Parameter

Comments

build

string / required

Package build.

name

string / required

Package name.

version

string / required

Package version.

Examples

- name: Install apt component
  apt:
    name: "{{ 'apt' | sensu.sensu_go.package_name(name, version, build) }}"

- name: Install yum component
  yum:
    name: "{{ 'yum' | sensu.sensu_go.package_name(name, version, build) }}"

Return Value

Key

Description

Return value

string

Package name, version and build as a formatted string.

Returned: success

Authors

  • Tadej Borovsak (@tadeboro)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.