extensions-website/playbooks/install.yaml

63 lines
1.5 KiB
YAML

---
- hosts: http
gather_facts: true
become: true
roles: [common]
vars:
playbook_type: install
tasks:
- name: Installing required packages
ansible.builtin.apt: name={{ item }} state=present
with_items:
- clamav-daemon
- clamav-unofficial-sigs
- ffmpeg
- git
- libpq-dev
- nginx-full
- postfix # to be able to configure /etc/aliases for cron
- postgresql-client
- python3.10
- python3-pip
- python3.10-venv
- vim
tags:
- deps
- name: Creating user "{{ user }}:{{ group }}"
ansible.builtin.user:
name: "{{ user }}"
group: "{{ group }}"
- import_tasks: common/tasks/add_alias.yaml
- name: Creating various directories
ansible.builtin.file: path={{ item }} state=directory owner={{ user }} group={{ group }} recurse=yes
with_items:
- "{{ dir.errors }}"
- "{{ dir.media }}"
- "{{ dir.source }}"
- import_tasks: tasks/pull.yaml
- name: Creating {{ env_file }}
ansible.builtin.template:
src: templates/dotenv
dest: "{{ env_file }}"
mode: 0644
backup: true
tags:
- dotenv
- import_tasks: tasks/configure_uwsgi.yaml
- import_tasks: tasks/deploy.yaml
- import_tasks: tasks/configure_nginx.yaml
tags:
- nginx
- import_tasks: tasks/setup_other_services.yaml
tags:
- services