Created
May 12, 2022 23:00
-
-
Save tomasbasham/f1eaf20c6dc35804a5656ad21851cd2b to your computer and use it in GitHub Desktop.
Install Puppet 7 on rhel 8 (Centos, RockyLinux, AlmaLinux)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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