Added: Playbook for chat server
This commit is contained in:
parent
91ba353d27
commit
dd1ad2beb7
3 changed files with 96 additions and 10 deletions
82
playbooks/02-xmpp-server.yaml
Normal file
82
playbooks/02-xmpp-server.yaml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
- 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
|
||||
owner: "{{ root.user }}"
|
||||
group: "{{ root.group }}"
|
||||
mode: "755"
|
||||
|
||||
- name: Create keyrings folder
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/keyrings
|
||||
state: directory
|
||||
owner: "{{ root.user }}"
|
||||
group: "{{ root.group }}"
|
||||
mode: "755"
|
||||
|
||||
- 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
|
||||
owner: "{{ root.user }}"
|
||||
group: "{{ root.group }}"
|
||||
mode: "755"
|
||||
|
||||
- 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
|
||||
community.general.composer:
|
||||
working_dir: "{{ movim.path }}"
|
||||
command: install
|
||||
become: true
|
||||
become_user: "{{ www.user }}"
|
||||
|
||||
- name: Cleaning up
|
||||
ansible.builtin.package:
|
||||
name: git
|
||||
state: absent
|
||||
Loading…
Add table
Add a link
Reference in a new issue