Skip to content

Instantly share code, notes, and snippets.

@ethernetdan
Last active February 12, 2018 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethernetdan/2e9164b9188af02b88e931ea9e82746e to your computer and use it in GitHub Desktop.
Save ethernetdan/2e9164b9188af02b88e931ea9e82746e to your computer and use it in GitHub Desktop.
#!/bin/bash
# Setup host
hostnamectl set-hostname foreman-1.lab.coreos.systems
# Configure repos
yum -y install yum-utils
yum-config-manager -y --enable rhel-7-server-optional-rpms
rpm --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install https://yum.theforeman.org/releases/nightly/el7/x86_64/foreman-release.rpm
yum -y install https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm
# get installer
yum -y install foreman-installer
#!/bin/bash
IFACE=$(route | grep '^default' | grep -o '[^ ]*$')
# Install Foreman DB master
foreman-installer \
--no-enable-foreman-plugin-bootdisk \
--foreman-proxy-dns=true \
--foreman-proxy-dns-interface=${IFACE} \
--foreman-proxy-dhcp=true \
--foreman-proxy-dhcp-interface=${IFACE} \
--foreman-proxy-bmc=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment