ModiPy 1.2 Released

I’m pleased to announce that version 1.2 of ModiPy has been released. You can grab it from the CheeseShop like this:

easy_install ModiPy

Easy!

What’s New?

This version of ModiPy is the most stable yet. It’s still beta, since there are some areas that don’t have enough test coverage yet, but we’re definitely getting there. We’ve also added a bunch of much wanted features.

Iterators

Iterators are like a for loop wrapped around a change. Unlike a standard for loop, and iterator uses dictionaries, so you can define a whole set of variable that can all change for each iteration.

So you can define a change that runs the same set of commands, but over 3 different base directories. Or you can add a series of license keys to a program, with the one change.

It’s variable substitution on steroids.

There’s support for manually defined iterators, where you type it all out yourself, or you can use a CSV file to define variables as columns, and the values in rows. Database support is coming, so you can integrate more easily with your CMDB. For now, you’ll have to manually export as CSV.

Complex Dependency Trees

You can define really complex trees of changes that will all execute in the right order, even in backout mode.

We’ve also added the noop flag for changes, so you can define an empty change with no targets (which would normally be an error) to act as a synchronisation point in your dependency tree.

Handy Command Line Options

We’ve added a few commandline options to help with testing, which we use ourselves.

–only will run just the changes you specify on the commandline

–skip is the opposite of –only, and will not run the change you specify. It is marked as successful for dependency purposes.

–sessionlog allows you to set the name of the logfile used for logging what happened.

Logging

All sessions are now logged by default, so you can audit what changes are applied to your environment. We’ll be adding an option to disable logging for those who need to run things unlogged.

Stay Tuned

We’re working hard on getting another version out soon. Please let us know if you hit a bug, or if you want a feature we haven’t already noted down in the tracker.

Until then, have fun automating your world!

Bookmark the permalink.

Comments are closed