A simple flask application offering a static, and dynamic, website and API originally
designed for use in Ansible Automation scenarios.
Tested with local sqlite and preferred postgres as backing store
It is strongly recommended to run this in a Python virtual environment and a requirements.txt is supplied.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtA simple sample dataset is provided, Ansible related books and resources
-
resources.py- Python dictionary defining resources -
config.py- Loads resources into database of choicepython config.py
resource_hubexport FLASK_APP=app
export FLASK_ENV=development # Turn on debugging (not necessary when app.run(debug=True))
flask run-
Simple Ping
curl <host>:<port>/api/v1/ping -s
"{ ping: \"alive\" }" -
Call the
resources APIcurl localhost:5000/api/v1/resources -s
[ { "author": "That Jeff Geerlinguy", "description": "Classic introduction to Ansible", "id": 1, "name": "Ansible for DevOps", "source": "Book", "url": "https://leanpub.com/ansible-for-devops" }, { "author": "James Freeman, Jesse Keating", "description": "Explores how Ansible works",
