feat: added hostname setting to puppet-initial
All checks were successful
Build / build-9 (pull_request) Successful in 47s
Build / build-8 (pull_request) Successful in 1m17s

- bumped release
- set hostname to be set in /etc/sysconfig/network and with hostnamectl
This commit is contained in:
Ben Vincent 2025-04-24 21:36:47 +10:00
parent c21e00497d
commit 18a5b33eb2
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,9 @@
#!/bin/bash
# Ensure the hostname is set
hostnamectl set-hostname $(hostname -s).main.unkin.net
grep '^HOSTNAME=' /etc/sysconfig/network | cut -d= -f2 | grep -q '\.' || sed -i 's/^\(HOSTNAME=[^\.]*\)$/\1.main.unkin.net/' /etc/sysconfig/network
# Install CA for Puppet
test -f /etc/puppetlabs/puppet/ssl/certs/ca.pem || mkdir -p /etc/puppetlabs/puppet/ssl/certs && wget --no-check-certificate https://puppetca.query.consul:8140/puppet-ca/v1/certificate/ca -O /etc/puppetlabs/puppet/ssl/certs/ca.pem