

def setup_salt():
    '\n    Setup the salt configuration files.\n    '
    server = [s for s in env.bootmachine_servers if (s.public_ip == env.host)][0]
    if (env.host == env.master_server.public_ip):
        append('/etc/salt/master', 'file_roots:\n  base:\n    - {0}'.format(settings.REMOTE_STATES_DIR))
        append('/etc/salt/master', 'pillar_roots:\n  base:\n    - {0}'.format(settings.REMOTE_PILLARS_DIR))
    sed('/etc/salt/minion', '#master: salt', 'master: {0}'.format(env.master_server.private_ip))
    sed('/etc/salt/minion', '#id:', 'id: {0}'.format(role.name))
    append('/etc/salt/minion', 'grains:\n  roles:')
    for role in server.roles:
        append('/etc/salt/minion', '    - {0}'.format(role))

dataset/ETHPy150Open rizumu/bootmachine/bootmachine/contrib/distros/rackspace_ubuntu_1210.py setup_salt/VarMisuse@108/217 `server`->`role`