https://github.com/pdrastil/demo-ansible-python
Demo deployment of Python application
https://github.com/pdrastil/demo-ansible-python
ansible nginx python
Last synced: about 2 months ago
JSON representation
Demo deployment of Python application
- Host: GitHub
- URL: https://github.com/pdrastil/demo-ansible-python
- Owner: pdrastil
- License: mit
- Created: 2020-01-27T10:08:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T23:26:31.000Z (over 3 years ago)
- Last Synced: 2025-05-14T18:11:22.431Z (about 1 year ago)
- Topics: ansible, nginx, python
- Language: Jinja
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Ansible demo playbook for IaaS
This repository contains demo Ansible playbook that will install
Nginx as reverse proxy with SSL and Flask demo application.
## Setup
- Install ansible via pip `pip install ansible`
- Add your hosts to `inventory/hosts` in `webservers` group.
- Ensure Ansible can connect to given hosts with account that can become root.
## Supported platforms
Following platforms have been tested during development.
- CentOS 7
- Debian 10 (Buster)
- Ubuntu 18.04 (Bionic Beaver)
## Usage
To deploy demo application run following:
```sh
$ ansible-playbook deploy.yml
```
> **NOTE:** Default configuration uses FQDN of provisioned server to setup Nginx server record.
> If not properly configured you might need to modify `server_name` variable in `inventory/group_vars`.
## Ansible role testing
Roles are testable with [Molecule](molecule.readthedocs.io) framework.
To run tests locally for given role install Docker and run:
```sh
$ pip install molecule docker
$ cd roles/nginx
$ molecule test
```