Sensu Go agent role¶
This role installs, configures and starts the sensu-agent
service.
Example playbook¶
The most basic
agent playbook
looks like this:
---
- name: Install, configure and run Sensu agent
hosts: agents
roles:
- sensu.sensu_go.agent
vars:
agent_config:
backend-url: [ "ws://upstream-backend:4321" ]
This playbook will install the latest stable version of the Sensu Go agent and configure it. We can customize the agent’s configuration by adding more options to the agent_config variable.
Agent configuration options¶
The agent_config variable can contain any option that is valid for the Sensu Go agent version we are installing. All valid options are listed in the official Sensu documentation.
Note
Role copies the key-value pairs from the agent_config variable verbatim
to the configuration file. This means that we must copy the key names
exactly as they appear in the configuration reference. In a way, the
agent_config variable should contain a properly indented copy of the
/etc/sensu/agent.yml
file.
Tested Platforms (CI/CD)¶
OS |
distribution |
versions |
---|---|---|
Linux |
CentOS |
7, 8 |
RedHat |
7, 8 |
|
Debian |
9, 10 |
|
Ubuntu |
14.04, 16.04, 18.04 |