Ansible project structure - JorgeFrancoIbanez/FlaskForm GitHub Wiki

##Ansible Folder Structure

|
|-- yaml/
|---- deploy.yml
|---- install.yml
|---- apache.yml
|---- mysql.yml
|---- pip.yml
|---- gitclone.yml
|---- ufw.yml
|---- php.yml
|conf/ 
|---- virthost.conf
|---- form.sql
|---- flask.wsgi
|---- dir.conf
|---- php
|------ index.php
|---- roles/ 
|------ ...
|------ ...
|

The yaml/ contains all the playbook used to deploy the server configurations.

  • deploy.yml : is the main playbook, has the variablel declaration and more.
  • install.yml : install all the requerid packages and libaries.
  • apache.yml : enable all the modules needed by apache, copy the virtual host file into "/etc/apache2/sites-available/", enable the new virtual host and restart the Apache service.
  • mysql.yml : configure the mysql services and create a replica of the project database.
  • pip.yml : get the last version of pip.
  • gitclone.yml : clone the project repo into "/var/www/html/FlaskForm".
  • ufw.yml : set the firewall.
  • php.yml : configure php.

The conf/ folder has files needed to deploy this application (Some can be used as a template).

  • virthost.conf :
  • form.sql
  • flask.wsgi
  • dir.conf

Note: the roles/ is only there for future works(as a reminder to make some changes).