Fabric YAML File

Regarding the use of Fabric, in the Tav Blog here: http://tav.espians.com/fabric-python-with-cleaner-api-and-parallel-deployment-support.html

I read that Fabric can support YAML configuration files.

env.config_file = 'deploy.yaml'

You can then access the YAML data using the variable "env.config" as follows:

 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 to work.

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

+4
source share
1 answer

The Tav blog is a regular Fabric fork that has not been pulled into Mainline. It is also outdated now.

The way you installed them will be with the fabricrc file. This is stated 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

+4
source

Source: https://habr.com/ru/post/1491425/


All Articles