outrunthewolf
outrunthewolf

Reputation: 383

YAML file in Fabric

With regards to using Fabric, In "Tav's Blog" here: http://tav.espians.com/fabric-python-with-cleaner-api-and-parallel-deployment-support.html

I've read that Fabric can support YAML config files.

env.config_file = 'deploy.yaml'

You can then access the YAML data using the "env.config" variable like so:

def get_latest_commit():
    return urlopen(env.config.commits_server).read()


@task
    def deploy():
        with cd(env.config.app_directory):
        ...

For some reason I can't get this working.

Has anyone used this before? Can they give me a simple explanation or example of how to use these YAML configs in Fabric files?

Upvotes: 6

Views: 2770

Answers (1)

Morgan
Morgan

Reputation: 4131

Tav's blog is a custom fork of Fabric that wasn't pulled into Mainline. It's currently become outdated as well.

The way you'd set these would be with a fabricrc file. This is talked about here:

http://docs.fabfile.org/en/1.7/usage/fab.html?highlight=fabricrc#settings-files

and here

http://docs.fabfile.org/en/1.7/usage/fabfiles.html?highlight=fabricrc

Upvotes: 5

Related Questions