puppet-prod/hieradata/roles/infra/ntp/server.yaml
Ben Vincent da3444e49f feat: create ntp consul service
- create consul policy for ntp servers
- add consul service check and check script
2024-06-02 19:23:39 +10:00

36 lines
739 B
YAML

---
profiles::ntp::client::client_only: false
profiles::ntp::server::allowquery:
- '198.18.13.0/24'
- '198.18.14.0/24'
- '198.18.15.0/24'
- '198.18.16.0/24'
- '198.18.17.0/24'
profiles::ntp::server::peers:
- '0.au.pool.ntp.org'
- '1.au.pool.ntp.org'
- '2.au.pool.ntp.org'
- '3.au.pool.ntp.org'
consul::services:
ntp:
service_name: 'ntp'
tags:
- 'ntp'
- 'time'
- 'sync'
address: "%{facts.networking.ip}"
port: 123
checks:
- id: ntp_check
name: "NTP Service Check"
args:
- '/usr/local/bin/check_ntp.sh'
interval: '15s'
timeout: '5s'
profiles::consul::client::node_rules:
- resource: service
segment: ntp
disposition: write