Files @ a52f9fdabd0f
Branch filter:

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

branko
MAR-132: Added support for Debian 9 (Stretch) to web_server role:

- Introduced internal parameters for controlling differing package
names, service names, and paths for PHP FPM package.
- Added Debian 9 machines to Molecule configuration, including the
client machine.
- Restructured slightly preparaiton playbook to support both Jessie
and Stretch.
- Added custom pytest fixture for having a better way to determine
expected package names etc related to PHP.
- Created copy of private key/certificate pair used for testing of
mandatory parameters (to be used with Stretch machine).
- Fixed invalid specification for hosts on top of which the
connectivity test should be run.
- Updated a couple of task names (avoiding to reference PHP 5).
- Updated documentation.
---

- 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: 0750

- 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: 0640
  with_items:
    - wsgi_requirements.in
    - wsgi_requirements.txt

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

- name: Install Gunicorn via requirements file
  become: true
  become_user: "{{ admin }}"
  pip:
    requirements: "{{ home }}/.wsgi_requirements.txt"
    state: present
    virtualenv: "{{ home }}/virtualenv"
  register: install_gunciron_via_requirements
  notify:
    - Restart WSGI services