Salt

From KeegansWiki
Jump to navigation Jump to search

Add minion

export http_proxy="http://proxy.traderonline.com:80" && if [ "$(grep "http_proxy" /etc/yum.conf | /usr/bin/wc -l)" == "1" ] ; then echo "Proxy is already configured" ; else echo "http_proxy=http://proxy.traderonline.com:80" >> /etc/yum.conf && echo "Proxy configured" ; fi && if [ "$(grep "release 5" /etc/redhat-release | /usr/bin/wc -l)" == "1" ] ; then rpm -Uvh http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm ; else rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm ; fi ; mv /etc/yum.repos.d/epel.repo /tmp/ && sed 's/https:/http:/' /tmp/epel.repo > /etc/yum.repos.d/epel.repo && echo `/bin/hostname` > /etc/hostname && yum -y install salt-minion && cp /systems/kgn/minion /etc/salt/ && chkconfig salt-minion on && /etc/init.d/salt-minion restart

Re-add Minion

On Master:

  • salt-key -d <hostname>

On minion:

  • stop salt
  • rm /etc/salt/pki/minion/minion.*
  • rm /etc/salt/minion_id
  • service salt start

On Master:

  • salt-key -A