From 18e0214a21ac3246c957ab5ec79ccee82a4197c9 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 24 Apr 2024 23:12:59 -0400 Subject: [PATCH] Updated post-install script without salt --- scripts/initial-setup.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/scripts/initial-setup.sh b/scripts/initial-setup.sh index 6a376d6..ed70e4a 100644 --- a/scripts/initial-setup.sh +++ b/scripts/initial-setup.sh @@ -1,6 +1,6 @@ #!/bin/bash -SALT_MASTER='salt-v1.int.metaunix.net' +PUPPET_MASTER='puppet-v1.int.metaunix.net' # determine OS version if [ -f '/etc/redhat-release' ]; then @@ -20,25 +20,11 @@ if [ "$OS" = 'freebsd' ]; then # Configure system hostname sysrc hostname="$HOSTNAME.$DOMAIN" - # Configure salt - echo "$HOSTNAME" > /usr/local/etc/salt/minion_id - sed -i .orig "s/\#master: salt/master: $SALT_MASTER/" /usr/local/etc/salt/minion - rm -rf /usr/local/etc/salt/pki - - # Enable and start salt - sysrc salt_minion_enable="YES" - service salt_minion start + # Install Puppet + pkg install -y puppet7 + echo -e "[agent]\nserver = $PUPPET_MASTER" > /usr/local/etc/puppet/puppet.conf + sysrc puppet_enable="YES" else # Configure system hostname hostnamectl set-hostname "$HOSTNAME" - - # Configure salt - echo "$HOSTNAME" > /etc/salt/minion_id - sed -i "s/\#master: salt/master: $SALT_MASTER/" /etc/salt/minion - - # Enable and start salt - systemctl stop salt-minion - rm -rf /etc/salt/pki - systemctl start salt-minion - systemctl enable salt-minion fi