-
-
Save mccun934/2a71e35c5a2ab0c615fb to your computer and use it in GitHub Desktop.
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
yum install -y libvirt | |
service libvirtd start | |
puppet module install -i /tmp domcleal/katellovirt | |
echo "Full NAT Forwarding" | |
cd /tmp/katellovirt/ | |
grep -v virbr manifests/libvirt.pp > tempfile | |
cp tempfile manifests/libvirt.pp | |
puppet apply -v -e 'include katellovirt' --modulepath /tmp | |
export FORWARDERS=$(for i in $(cat /etc/resolv.conf |grep nameserver|awk '{print $2}'); do echo --capsule-dns-forwarders $i;done) | |
export OAUTH_SECRET=$(grep oauth_consumer_secret /etc/foreman/settings.yaml | cut -d ' ' -f 2) | |
export VIRBR=$(ifconfig | grep virbr | awk '{print $1}') | |
export DNS_ZONE=$(hostname | cut -d '.' -f 2-) | |
echo $FORWARDERS | |
echo $OAUTH_SECRET | |
echo $VIRBR | |
echo $DNS_ZONE | |
katello-installer --capsule-parent-fqdn $(hostname) --capsule-dns true $FORWARDERS --capsule-dns-interface $VIRBR --capsule-dns-zone $DNS_ZONE --capsule-dhcp true --capsule-dhcp-interface $VIRBR --capsule-tftp true --capsule-tftp-servername $(hostname) --capsule-puppet true --capsule-puppetca true --capsule-register-in-foreman true --capsule-foreman-oauth-secret $OAUTH_SECRET -v | |
service dhcpd restart | |
service libvirtd restart | |
service foreman restart | |
service foreman-proxy restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment