summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ch-testvm-prometheus.yml
blob: ff36f73391ffc2afb65067cef62e58272a01c774 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
install_jumphost: ch-jump

install:
  vm:
    memory: 1G
    numcpus: 1
    autostart: False
  disks:
    primary: /dev/sda
    scsi:
      sda:
        type: zfs
        name: root
        size: 10g
        properties:
          'syncoid:sync': 'false'
  interfaces:
  - bridge: br-svc
    name: svc0

network:
  nameservers: "{{ network_zones.svc.dns }}"
  domain: "{{ host_domain }}"
  systemd_link:
    interfaces: "{{ install.interfaces }}"
  primary: &_network_primary_
    name: svc0
    address: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) }}"
    gateway: "{{ network_zones.svc.gateway }}"
    static_routes:
    - destination: "{{ network_zones.lan.prefix }}"
      gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}"
  interfaces:
  - *_network_primary_

ntp_variant: systemd-timesyncd


###
managed_ca_authorities:
  foo:
    key:
      type: RSA
      size: 4096
    cert:
      common_name: foo CA
      country_name: "AT"
      locality_name: "Graz"
      organization_name: "spreadspace"
      organizational_unit_name: "ansible"
      state_or_province_name: "Styria"
      digest: sha256
      not_before: +0h
      not_after: +520w


mosquitto_broker_global_config_options:
  per_listener_settings: "true"

mosquitto_broker_listeners:
  example:
    bind: 1883
    options:
      allow_anonymous: "false"
      acl_file: /etc/mosquitto/example.acl
      password_file: /etc/mosquitto/example.passwd
  foo:
    bind: 1884 192.168.32.42
    hostnames:
    - mqtt.example.com
    tls:
      certificate_provider: managed-ca
      certificate_config:
        ca:
          host: ch-testvm-prometheus
          name: foo
        cert:
          organization_name: "spreadspace"
          organizational_unit_name: "ansible"
          san_extra:
          - "IP:192.168.32.42"
          extended_key_usage:
          - serverAuth
          extended_key_usage_critical: yes
          create_subject_key_identifier: yes
          not_after: +100w
    options:
      allow_anonymous: "false"
      require_certificate: "true"
      cafile: /etc/mosquitto/ca_certificates/foo-ca-crt.pem
      use_identity_as_username: "true"
      acl_file: /etc/mosquitto/foo.acl

mosquitto_broker_prometheus_listener: true

mosquitto_broker_acl_files:
  example: |
    user admin
    topic read test/+
    user equinox
    topic write test/+
  foo: |
    user consumer
    topic read foo/+
    user producer
    topic write foo/+

mosquitto_broker_password_files:
  example: |
    admin:{{ 'admin' | mosquitto_passwd_hash('admin@mqtt.example.com') }}
    equinox:{{ 'secret' | mosquitto_passwd_hash('equinox@mqtt.example.com') }}