This is a toy project to implement a simple pure-python server provisioning system. It should only use pure-python3 without additional dependencies installed.
It has plug-ins for:
- apt
- file templates
./ansimple.py playbook.json
The input file is a JSON file. It is a sorted list of items. Each item has a single key that denotes the provider and a dict containing the options.
Install a package (e.g. with apt-get).
[
{ "package":{ "name": "git" }},
]
[
{ "file":{ "path": "/tmp/xxx", "owner": "root", "mode": 755, "content": "AAAA" }}
{ "file":{ "path": "/tmp/withtemplate", "vars": {"name": "Reinhard"} }}
]
[
{ "user":{ "name": "avgowl", "home": "/home/avgowl", "shell": "/bin/bash"} }}
]
A test suite tests all important functions to safely implement changes.
python3 -m unittest testsuite