I work on a lot of different systems - many linux distributions, windows (with cygwin), osx, bsd, etc.
I hate manually setting up each environment and have been considering for awhile now, working on a python module that will automate things like setting up a bash environment, configuring git, configuring virtual environments, configuring applications across different platforms, etc.
My idea for this is to create a python module takes a git url as a parameter, in that git repo would be a configuration file that specifies some 'meta' commands that would be performed by the parser, such as:
Does anything like this already exist? Good idea? Bad idea? Ideas for improvements?
I'm not sure I've seen it used as a module, but ansible is a tool written in Python that will do all these things. The 'meta' commands are in yaml files.
It's usually run from the command line though, not as an imported module.
还有Puppet( Puppet配置管理 )
Saltstack, like ansible, is a set of tools to configure remote machines. It is written in python, and can be used via a python API if you so desire. The advantage salt has over ansible is that salt can configure Windows machines as well as *nix-type machines.
Here is a really brief example from their documentation:
import salt.client
local = salt.client.LocalClient()
local.cmd('*', 'test.fib', [10])
For more information see:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.