Merge pull request 'feat: added hostname setting to puppet-initial' (#30) from neoloc/puppet-initial-hostname into master
Reviewed-on: https://git.query.consul/unkin/rpmbuilder/pulls/30
This commit is contained in:
commit
5c6fadf1b2
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user