posts](https://www.enricozini.org/blog/2021/transilience/use-ansible-actions-in-a-script/). It might also suffer [second-system syndrome](https://en.wikipedia.org/wiki/Second-system_effect) in the
sense that it might become also complicated as it tries to replicate
more of Ansible's features. It could still offer a good source of
library items to do common tasks like install packages and so on.
### spicerack and cumin
The Wikimedia Foundation (WMF, the organisation running Wikipedia)
created a set of tools called [spicerack](https://github.com/wikimedia/operations-software-spicerack). It is a framework of
Python code built on top of [Cumin](cumin), on top of which they wrote a
set of [cookbooks](https://gerrit.wikimedia.org/r/plugins/gitiles/operations/cookbooks) to automate various ad-hoc operations on the
cluster.
created a set of tools called [spicerack](https://doc.wikimedia.org/spicerack/master/)([source code](https://github.com/wikimedia/operations-software-spicerack)). It is
a framework of Python code built on top of [Cumin](cumin), on top of which
they wrote a set of [cookbooks](https://gerrit.wikimedia.org/r/plugins/gitiles/operations/cookbooks) to automate various ad-hoc
operations on the cluster.
Like Fabric, it doesn't ship Python code on the remote servers: it
merely executes shell commands. The advantage over Fabric is that it
bridges with the Cumin inventory system to target servers based on the
domain-specific language (DSL) available there.
It is also very WMF-specific, and probably would be useless outside of
that context. It does have good examples of how Cumin can be used as a
library for certain operations, however.
It is also very WMF-specific, and could be difficult to use outside of
that context. Specifically, there might be a lot of hardcoded
assumptions in the code that we'd need to patch out (example, [Ganeti
instance creation code](https://github.com/wikimedia/operations-software-spicerack/blob/1a9aa78197d983b87756da38fe5a6414c16ef866/spicerack/ganeti.py#L229), which would then therefore require a
fork. Fortunately, [spicerack has regular releases](https://github.com/wikimedia/operations-software-spicerack/tags) which makes
tracking forks easier. Collaboration with upstream is possible, but
requires registering and contributing to their [Gerrit instance](https://gerrit.wikimedia.org/)
(see for example [the work anarcat did on Cumin](https://gerrit.wikimedia.org/r/q/owner:anarcat%2540debian.org)).
It does have good examples of how Cumin can be used as a library for
certain operations, however.
One major limitation of Spicerack is that it uses Cumin as a
transport, which implies that it can only execute shell commands on
the remote server: no complex business logic can be carried over to
the remote side, or, in other words, we can't run Python code