infrastructure/playbooks/02-xmpp-server.yaml

74 lines
1.9 KiB
YAML

- name: Configuration of jabber server
hosts: chatservers
tasks:
- name: Use variables
ansible.builtin.include_vars: vars.yml
- name: Configure ejabber apt sources
ansible.builtin.blockinfile:
path: /etc/apt/sources.list.d/process-one-stable.sources
create: true
block: |
Enabled: yes
Types: deb
URIs: https://repo.process-one.net/deb
Suites: stable
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/ejabberd.gpg
- name: create keyrings folder
ansible.builtin.file:
path: /etc/apt/keyrings
owner: root
state: directory
- name: Adding process-one (ejabberd) gpg key to apt keyring
ansible.builtin.get_url:
url: https://repo.process-one.net/ejabberd.gpg
dest: /etc/apt/keyrings/ejabberd.gpg
- name: Installing required packages
ansible.builtin.package:
name:
- composer
- php-fpm
- php-curl
- php-mbstring
- php-imagick
- php-gd
- php-pgsql
- php-xml
- postgresql
- nginx
- ejabberd
- git
state: present
- name: Cloning Movim
ansible.builtin.git:
repo: https://github.com/movim/movim.git
dest: "{{ movim.path }}"
version: "{{ movim.version }}"
- name: Setting Mode and Ownershp
ansible.builtin.file:
path: "{{ movim.path }}"
state: directory
owner: "{{ www.user }}"
group: "{{ www.group }}"
recurse: true
mode: "755"
- name: Installing Movim dependanciens
ansible.builtin.composer:
working_dir: "{{ movim.path }}"
command: install
become: true
become_user: "{{ www.user }}"
- name: Cleaning up
ansible.builtin.package:
name: git
state: absent