YAML file in Fabric

fabric, python

Solution

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

Problem

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?

Original source