Skip to content
Snippets Groups Projects
Select Git revision
  • a4abf7cf0f8b7f86e9f28815e7fefba163136793
  • master default protected
  • postgres_integration
  • s3compatible
  • intros
  • bootstrap4
  • modules
7 results

l2pauth.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    app.yml 4.54 KiB
    ---
    
    
    - include_vars: "{{ item }}"
      with_items:
        - "../vars/{{ app.app }}.yml"
        - "{{ inventory_dir }}/vars/{{ app.app_vars }}"
      tags:
        - uwsgi-app
        - "{{ app.app }}"
        - "{{ app.instance }}"
    
    - name: ensure we have python 2
      apt:
        name: "{{ item }}"
        state: installed
      with_items:
        - python
        - python-dev
        - python-virtualenv
        - uwsgi-plugin-python
        - virtualenv
      when: app_python_version == 2
      tags:
        - uwsgi-app
        - "{{ app.app }}"
        - "{{ app.instance }}"
    
    - name: ensure we have python 3
      apt:
        name: "{{ item }}"
        state: installed
      with_items:
        - python3
        - python3-dev
        - python3-virtualenv
        - uwsgi-plugin-python3
        - virtualenv
      when: app_python_version == 3
      tags:
        - uwsgi-app
        - "{{ app.app }}"
        - "{{ app.instance }}"
    
    - include: sqlite.yml
      when: app.db == "sqlite"
    
    - include: mysql.yml
      when: app.db == "mysql"
    
    - include: postgres.yml
      when: app.db == "postgres"
    
    - name: ensure we have a group
      group:
        name: "{{ app_group }}"
        system: yes
        state: present
      tags:
        - uwsgi-app
        - "{{ app.app }}"
        - "{{ app.instance }}"
    
    - name: ensure we have a user
      user:
        name: "{{ app_user }}"
        group: "{{ app_group }}"
        system: yes
        home: "{{ app_home }}"
        shell: /usr/bin/nologin