Installing FreeIPA in as few lines as possible

I had this in another post, but I think it is worth its own.

sudo hostnamectl set-hostname --static undercloud.ayoung-dell-t1700.test
export address=`ip -4 addr  show eth0 primary | awk '/inet/ {sub ("/24" ,"" , $2) ; print $2}'`
echo $address `hostname` | sudo tee -a /etc/hosts
sudo yum -y install ipa-server-dns
export P=FreIPA4All
ipa-server-install -U -r `hostname -d|tr "[a-z]" "[A-Z]"` -p $P -a $P --setup-dns `awk '/^name/ {print "--forwarder",$2}' /etc/resolv.conf`

Just make sure you have enough entropy.

2 thoughts on “Installing FreeIPA in as few lines as possible

  1. `rolectl deploy –name=$(hostname -d) domaincontroller`

    That does everything you just typed (and could set the machine domain name instead of reading it from hostname.

  2. Sorry, I left out the JSON for explicitly setting the password; this one generates random admin and DM passwords that can be retrieved and then cleared. See the man page.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.