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
.
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 |
---|---|
Package type. Choices:
|
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 |
---|---|
Package build. |
|
Package name. |
|
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 |
---|---|
Package name, version and build as a formatted string. Returned: success |