Skip to content

Instantly share code, notes, and snippets.

@tomasbasham
Created May 12, 2022 23:00
Show Gist options
  • Save tomasbasham/f1eaf20c6dc35804a5656ad21851cd2b to your computer and use it in GitHub Desktop.
Save tomasbasham/f1eaf20c6dc35804a5656ad21851cd2b to your computer and use it in GitHub Desktop.
Install Puppet 7 on rhel 8 (Centos, RockyLinux, AlmaLinux)
#!/usr/bin/env bash
set -e
# Ensure the script is running as root
if [[ "$(id -u)" != '0' ]]; then
exec sudo "$BASH_SOURCE" "$@"
fi
# Update the system
echo "===> Updating system"
dnf upgrade -y --refresh
# Install a release package to enable Puppet Platform repositories
echo "===> Installing Puppet release packages"
dnf install -y https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# Install puppet agent
echo "===> Installing Puppet"
dnf install -y puppet-agent
# Enable the puppet agent to start on next boot
systemctl enable puppet
echo "===> Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment