Lab 12 - Solution """"""""""""""""" * Solution Project: https://github.com/pstauffer/flask-mysql-app/tree/master/lab12_solution .. important:: This is just an example of a solution. * You can also split the project into more roles and work with dependencies * mysql role (reusable for other projects) * gunicorn role (reusable for other projects) * flask role (reusable for other projects) * git role (reusable for other projects) * Use fixed variables inside the roles in ``vars/main.yml`` * Manage the whole ``my.cnf`` as template and add the ``ansible_managed`` header * Verify, if the ``database`` already exists (to replace the ``ignore_errors``) * Use fixed versions for the packages (gunicorn, mysql-server, ...) to make sure, the application works with this versions * put the RedHat / Debian part into own files ``redhat.yml / ``debian.yml`` * Verify, if the application (gunicorn) is already running (to make the task idempotent) * use tags Commit your changes ------------------- * add all files to your git repo and commit it .. code-block:: bash git status git add * git commit -m 'lab 12'