fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] How is config file merged into environment?


From: Steve Steiner (listsin)
Subject: Re: [Fab-user] How is config file merged into environment?
Date: Sat, 27 Jun 2009 09:47:23 -0400


On Jun 27, 2009, at 5:28 AM, Jordi Funollet wrote:

Hi Steve,

I had this itch, too. I put a recipe on the wiki that takes hosts files, one host by line. I tried to mimic the file format from 'dsh' so I can share the
configuration files.

http://wiki.fabfile.org/Recipes#Load_hosts_from_a_file

Usage, assuming we have a file '~/.dsh/group/prod':

fab hostsfile:prod ls

Please note that I'm using Fabric 0.0.9, maybe you need to change something.

Jordi, thanks for that, didn't see it on the wiki. Funny thing is the config handling that already exists in Fabric does almost exactly the same thing; I'll have to look and see what's different.

It might be worth adding a --hosts parameter for adding a file for just adding hosts with some special handling about not overwriting what's in the current list i.e. making them additive.

Jeff -- what about adding some special handling for --hosts files? Seems like a _very_ common use-case and would be a piece of cake to implement either modifying the existing handler or using Jordi's code if it actually does something different.

I know...push it off for 1.0 but that's not to say it couldn't remain an 'undocumented but incredibly useful' feature in the next release. I'll make the doc a .hidden file ;-).

Thanks,

S





reply via email to

[Prev in Thread] Current Thread [Next in Thread]