feat: add incus role (#229)
- add basic infra::incus role - add autossl, consul and ssh-principals for incus Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/229
This commit is contained in:
parent
dd5a4646ff
commit
6a04701891
33
hieradata/roles/infra/incus/node.yaml
Normal file
33
hieradata/roles/infra/incus/node.yaml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
profiles::pki::vault::alt_names:
|
||||||
|
- incus.service.consul
|
||||||
|
- incus.query.consul
|
||||||
|
- "incus.service.%{facts.country}-%{facts.region}.consul"
|
||||||
|
|
||||||
|
profiles::ssh::sign::principals:
|
||||||
|
- incus.service.consul
|
||||||
|
- incus.query.consul
|
||||||
|
- "incus.service.%{facts.country}-%{facts.region}.consul"
|
||||||
|
|
||||||
|
# configure consul service
|
||||||
|
consul::services:
|
||||||
|
incus:
|
||||||
|
service_name: 'incus'
|
||||||
|
tags:
|
||||||
|
- 'incus'
|
||||||
|
- 'container'
|
||||||
|
- 'lxd'
|
||||||
|
address: "%{facts.networking.ip}"
|
||||||
|
port: 8443
|
||||||
|
checks:
|
||||||
|
- id: 'incus_https_check'
|
||||||
|
name: 'incus HTTPS Check'
|
||||||
|
http: "https://%{facts.networking.fqdn}:8443"
|
||||||
|
method: 'GET'
|
||||||
|
tls_skip_verify: true
|
||||||
|
interval: '10s'
|
||||||
|
timeout: '1s'
|
||||||
|
profiles::consul::client::node_rules:
|
||||||
|
- resource: service
|
||||||
|
segment: incus
|
||||||
|
disposition: write
|
||||||
10
site/roles/manifests/infra/incus/node.pp
Normal file
10
site/roles/manifests/infra/incus/node.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# a role to deploy a incus node
|
||||||
|
class roles::infra::incus::node {
|
||||||
|
if $facts['firstrun'] {
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::firstrun::init
|
||||||
|
}else{
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::base
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user