Update Ansible packages

This commit is contained in:
Alexandre Iooss 2020-09-01 16:32:13 +02:00
parent 08defd84e6
commit 5efb150583
5 changed files with 47 additions and 34 deletions

View File

@ -41,7 +41,7 @@ Sinon vous pouvez suivre les étapes ici.
3. **Création d'un environment de travail Python décorrélé du système.** 3. **Création d'un environment de travail Python décorrélé du système.**
```bash ```bash
$ python3 -m venv env $ python3 -m venv env --system-site-packages
$ source env/bin/activate $ source env/bin/activate
(env)$ pip3 install -r requirements.txt (env)$ pip3 install -r requirements.txt
(env)$ deactivate # sortir de l'environnement (env)$ deactivate # sortir de l'environnement

View File

@ -1,23 +1,47 @@
--- ---
- name: Install basic APT packages - name: Add buster-backports to apt sources
apt_repository:
repo: deb http://{{ mirror }}/debian buster-backports main
state: present
- name: Install note_kfet APT dependencies
apt: apt:
update_cache: true update_cache: true
default_release: buster-backports
name: name:
- nginx # Common tools
- python3
- python3-pip
- python3-dev
- uwsgi
- uwsgi-plugin-python3
- python3-venv
- git
- acl
- gettext - gettext
- libjs-bootstrap4 - git
- ipython3
# Front-end dependencies
- fonts-font-awesome - fonts-font-awesome
- texlive-latex-extra - libjs-bootstrap4
# Python dependencies
- python3-babel
- python3-django
- python3-django-cas-server
- python3-django-crispy-forms
- python3-django-extensions
- python3-django-filters
- python3-django-polymorphic
- python3-djangorestframework
- python3-lockfile
- python3-phonenumbers
- python3-pil
- python3-pip
- python3-psycopg2
- python3-venv
# LaTeX (PDF generation)
- texlive-fonts-extra - texlive-fonts-extra
- texlive-lang-french - texlive-lang-french
- texlive-latex-extra
# WSGI server
- uwsgi
- uwsgi-plugin-python3
register: pkg_result register: pkg_result
retries: 3 retries: 3
until: pkg_result is succeeded until: pkg_result is succeeded

View File

@ -31,19 +31,7 @@
- name: Setup cron jobs - name: Setup cron jobs
file: file:
src: /var/www/note_kfet/note.cron src: ../note.cron
dest: /etc/cron.d/note dest: /etc/cron.d/note
state: link
owner: root owner: root
group: root group: root
- name: Restart cron service
systemd:
name: cron
state: restarted
- name: Update permissions for the cron file
file:
path: /var/www/note_kfet/note.cron
owner: root
group: www-data

View File

@ -1,14 +1,8 @@
--- ---
- name: Install PIP basic dependencies - name: Install PIP basic dependencies
pip: pip:
requirements: /var/www/note_kfet/requirements/base.txt requirements: /var/www/note_kfet/requirements.txt
virtualenv: /var/www/note_kfet/env
virtualenv_command: /usr/bin/python3 -m venv
become_user: www-data
- name: Install PIP production dependencies
pip:
requirements: /var/www/note_kfet/requirements/production.txt
virtualenv: /var/www/note_kfet/env virtualenv: /var/www/note_kfet/env
virtualenv_command: /usr/bin/python3 -m venv virtualenv_command: /usr/bin/python3 -m venv
virtualenv_site_packages: true
become_user: www-data become_user: www-data

View File

@ -1,4 +1,11 @@
--- ---
- name: Install NGINX
apt:
name: nginx
register: pkg_result
retries: 3
until: pkg_result is succeeded
- name: Copy conf of Nginx - name: Copy conf of Nginx
template: template:
src: "nginx_note.conf" src: "nginx_note.conf"