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. Once removed, you can still install the collection manually with ansible-galaxy collection install sensu.sensu_go. See the discussion thread for more information.
New in sensu.sensu_go 1.13.2
This describes the input of the filter, the value before | sensu.sensu_go.package_name.
Parameter | Comments |
|---|---|
Input string / required | Package type. Choices:
|
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. |
- 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) }}"
Key | Description |
|---|---|
Return value string | Package name, version and build as a formatted string. Returned: success |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/sensu/sensu_go/package_name_filter.html