init
This commit is contained in:
commit
883f31932e
169 changed files with 5676 additions and 0 deletions
84
ansible/roles/prosody/tasks/deploy-prosody.yml
Normal file
84
ansible/roles/prosody/tasks/deploy-prosody.yml
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
-
|
||||
name: Ensure install directory exists
|
||||
file:
|
||||
path: "{{ install_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
-
|
||||
name: Ensure modules directory exists
|
||||
file:
|
||||
path: "{{ install_dir }}/modules"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
when: oauth_client_id is defined or default_contacts is defined or smtp_host is defined or session_timeout is defined
|
||||
|
||||
-
|
||||
name: Deploy mod_auth_oauth_external
|
||||
copy:
|
||||
src: mod_auth_oauth_external.lua
|
||||
dest: "{{ install_dir }}/modules/mod_auth_oauth_external.lua"
|
||||
when: oauth_client_id is defined
|
||||
|
||||
-
|
||||
name: Deploy mod_sasl_oauthbearer_only_bosh
|
||||
copy:
|
||||
src: mod_sasl_oauthbearer_only_bosh.lua
|
||||
dest: "{{ install_dir }}/modules/mod_sasl_oauthbearer_only_bosh.lua"
|
||||
when: oauth_client_id is defined
|
||||
|
||||
-
|
||||
name: Deploy mod_default_contacts
|
||||
template:
|
||||
src: mod_default_contacts.lua.j2
|
||||
dest: "{{ install_dir }}/modules/mod_default_contacts.lua"
|
||||
when: default_contacts is defined
|
||||
|
||||
-
|
||||
name: Deploy mod_session_timeout
|
||||
copy:
|
||||
src: mod_session_timeout.lua
|
||||
dest: "{{ install_dir }}/modules/mod_session_timeout.lua"
|
||||
when: session_timeout is defined
|
||||
|
||||
-
|
||||
name: Deploy mod_offline_email
|
||||
template:
|
||||
src: mod_offline_email.lua.j2
|
||||
dest: "{{ install_dir }}/modules/mod_offline_email.lua"
|
||||
when: smtp_host is defined
|
||||
|
||||
-
|
||||
name: Deploy prosody configuration
|
||||
template:
|
||||
src: prosody.cfg.lua.j2
|
||||
dest: "{{ install_dir }}/prosody.cfg.lua"
|
||||
|
||||
-
|
||||
name: Deploy docker-compose file
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ install_dir }}/docker-compose.yml"
|
||||
|
||||
-
|
||||
name: Start prosody stack
|
||||
include_role:
|
||||
name: docker
|
||||
tasks_from: start-compose
|
||||
vars:
|
||||
compose_project_dir: "{{ install_dir }}"
|
||||
|
||||
-
|
||||
name: Deploy prosody backup script
|
||||
include_role:
|
||||
name: docker
|
||||
tasks_from: deploy-backup
|
||||
vars:
|
||||
backup_name: prosody
|
||||
backup_hook_dir: /etc/restic/pre-backup.d
|
||||
backup_volumes:
|
||||
- prosody_prosody_data
|
||||
backup_files:
|
||||
- "{{ install_dir }}/docker-compose.yml"
|
||||
- "{{ install_dir }}/prosody.cfg.lua"
|
||||
Loading…
Add table
Add a link
Reference in a new issue