Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added script for fedora 26 based on centos 7 #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions fedora_26.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# This bootstraps Puppet on Fedora 26

set -e

REPO_URL="http://yum.puppetlabs.com/puppetlabs-release-pc1-fedora-26.noarch.rpm"

if [ "$EUID" -ne "0" ]; then
echo "This script must be run as root." >&2
exit 1
fi

if which puppet > /dev/null 2>&1; then
echo "Puppet is already installed."
exit 0
fi

# Install wget
echo "Installing wget..."
yum install -y wget > /dev/null


# Install puppet labs repo
echo "Configuring PuppetLabs repo..."
repo_path=$(mktemp)
wget --output-document="${repo_path}" "${REPO_URL}" 2>/dev/null
rpm -i "${repo_path}" >/dev/null

# Install Puppet...
echo "Installing puppet"
yum install -y puppet > /dev/null

echo "Puppet installed!"