def install_salt(installer="ppa"):
    """
    Install salt with the chosen installer.
    """
    if installer == "ppa":
        run("echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | \
             sudo tee /etc/apt/sources.list.d/saltstack.list")
        key_url = "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6"
        run("wget -q -O- '{0}' | sudo apt-key add -".format(key_url))
        run("aptitude update")
        if env.host == env.master_server.public_ip:
            run("aptitude install -y salt-master")
        run("aptitude install -y salt-minion salt-syndic")
    else:
        raise NotImplementedError()
dataset/ETHPy150Open rizumu/bootmachine/bootmachine/contrib/distros/rackspace_ubuntu_1210.py/install_salt/original