Skip to content

gabyfulchic/ansible-flask

Repository files navigation

Ansible role to deploy a Flask project.

ansible-software-version flask-software-version molecule-software-version

Description

  • Install python & dependencies
  • Install Pypi pkgs following requirements file
  • Setup env vars
  • Launch project using flask run

Dependencies

  • python3.8
  • python3.8-pip
  • pip install --upgrade pip
  • pip install -r requirements.txt
  • certbot certonly --standalone for your domain & fill roles/flask/defaults/main.yaml with it.

Getting Started

Run >  
ansible-playbook -i inventory.ini provisioning-flask-app.yaml  
No Host Key Check >  
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i inventory.ini provisioning-flask-app.yaml  

Test the project

pip install molecule==2.22
molecule test

Debug

Dry-run >  
ansible-playbook --check --diff -i inventory.ini provisioning-flask-app.yaml  
Verbose mode >  
ansible-playbook -vvv --diff -i inventory.ini provisioning-flask-app.yaml  

About

My ansible repo here to setup flask apps on my servers. "https://github.com/pallets/flask"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published