Skip to content
Merged
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
19 changes: 14 additions & 5 deletions scripts/uib-puppet.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/bin/bash

# Install puppet repo, agent and theforman module
sudo yum install -y redhat-lsb-core.x86_64
sudo yum install -y https://yum.puppetlabs.com/puppet7-release-el-"$(lsb_release -sr|cut -d'.' -f1)".noarch.rpm
sudo yum install -y puppet-agent
sudo /opt/puppetlabs/bin/puppet module install theforeman/puppet
# Source information about the operating system we are running on
. /etc/os-release

# Install different versions of puppet repo and agent based on Enterprise Linux version
if [[ `echo $VERSION_ID | /bin/cut -d '.' -f1` -eq 8 ]]; then
sudo yum install -y redhat-lsb-core.x86_64
sudo yum install -y https://yum.puppetlabs.com/puppet7-release-el-"$(lsb_release -sr|cut -d'.' -f1)".noarch.rpm
sudo yum install -y puppet-agent
elif [[ `echo $VERSION_ID | /bin/cut -d '.' -f1` -eq 10 ]]; then
sudo dnf install -y https://yum.voxpupuli.org/openvox7-release-el-"$(echo $VERSION_ID | cut -d'.' -f1)".noarch.rpm
sudo dnf install -y openvox-agent
fi

# Install theforman module
sudo /opt/puppetlabs/bin/puppet module install theforeman/puppet

# Create dir for UiB spesifics
sudo mkdir /opt/uib
Expand Down