@task
def get_secrets():
    with settings(host=env.master):
        for environment in ['staging', 'production']:
            local_file = os.path.join(CONF_ROOT, 'pillar', environment, 'secrets.sls')
            if os.path.exists(local_file):
                local('cp {0} {0}.bak'.format(local_file))
            remote_file = os.path.join('/srv/pillar/', environment, 'secrets.sls')
            get(remote_file, local_file)
Grab the latest secrets file from the master.
dataset/ETHPy150Open codefordurham/Durham-Restaurants/fabfile.py/get_secrets