Files @ 36e1c9460cd6
Branch filter:

Location: majic-ansible-roles/roles/wsgi_website/tasks/requirements.yml

branko
MAR-27: Added initial scaffolding for testing mail_forwarder role:

- Fixed issues reported by Ansible linting check (some mode-related syntax and
one ignore.
- Added Molecule configuration for testing mandatory and optional
parameters. Covers both Debian Jessie and Debian Stretch.
- Added test playbook for setting-up the test instances. A helper relay mail
server.
- Updated both mail_server and mail_forwarder to fall-back to using
native (/etc/hosts) resolving if DNS fails. Solves issue with test environment
not having proper DNS set-up for all domains etc.
- Added a number of data/config files associated with tests.
- Added dummy test file.
---

- name: Set-up directory for storing requirements file for upgrade checks
  file: path="/etc/pip_check_requirements_upgrades/{{ fqdn }}" state=directory
        owner="root" group="pipreqcheck" mode=750

- name: Deploy WSGI requirements files for upgrade checks
  template: src="{{ item }}.j2" dest="/etc/pip_check_requirements_upgrades/{{ fqdn }}/{{ item }}"
            owner="root" group="pipreqcheck" mode="640"
  with_items:
    - wsgi_requirements.in
    - wsgi_requirements.txt

- name: Deploy Gunicorn requirements file for installation purposes
  become_user: "{{ admin }}"
  template: src="wsgi_requirements.txt.j2" dest="{{ home }}/.wsgi_requirements.txt"
            owner="{{ admin }}" group="{{ user }}" mode="640"

- name: Install Gunicorn via requirements file
  become_user: "{{ admin }}"
  pip: requirements="{{ home }}/.wsgi_requirements.txt" state=present virtualenv="{{ home }}/virtualenv"
  notify:
    - "Restart website {{ fqdn }}"