Skip to content

Instantly share code, notes, and snippets.

@asachs01
Created November 21, 2019 19:02
Show Gist options
  • Save asachs01/ab0665a7a02c4f3100ca1e8524920176 to your computer and use it in GitHub Desktop.
Save asachs01/ab0665a7a02c4f3100ca1e8524920176 to your computer and use it in GitHub Desktop.
---
- name: Install, configure and run Sensu backend in debug mode
hosts: monitoring-sensu
remote_user: centos
become: true
become_method: sudo
collections: [sensu.sensu_go]
roles:
- role: backend
backend_config:
state-dir: "/var/lib/sensu/sensu-backend"
debug: true
etcd-advertise-client-urls: "https://{{ ansible_default_ipv4.address }}:2379"
etcd-listen-client-urls: "https://{{ansible_default_ipv4.address}}:2379"
etcd-listen-peer-urls: "https://0.0.0.0:2380"
etcd-initial-advertise-peer-urls: "https://{{ansible_default_ipv4.address}}:2380"
etcd-initial-cluster-state: "new"
etcd-name: "{{ansible_hostname}}"
etcd-initial-cluster: "sensu00=https://sensu00.example.com:2380,sensu01=https://sensu01.example.com:2380,sensu02=https://sensu02.example.com:2380"
etcd-initial-cluster-token: ""
cert-file: "/etc/pki/tls/certs/fullchain.pem"
key-file: "/etc/pki/tls/private/privkey.pem"
etcd-cert-file: "/etc/pki/tls/certs/fullchain.pem"
etcd-key-file: "/etc/pki/tls/private/privkey.pem"
etcd-peer-cert-file: "/etc/pki/tls/certs/fullchain.pem"
etcd-peer-key-file: "/etc/pki/tls/private/privkey.pem"
- name: Install, configure and run Sensu agents on monitoring cluster members
hosts: monitoring-sensu
remote_user: centos
become: true
become_method: sudo
collections: [sensu.sensu_go]
roles:
- role: agent
agent_backend_urls:
- wss://sensu00.example.com:8081
agent_config:
subscriptions:
- linux
- system
trusted-ca-file: "/path/to/file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment