Download:
child 306:6092d5a5668b
parent 304:637853c693a1
305:afe29fdf065f
Anton Shestakov <av6@dwimlabs.net>, Thu, 28 Jun 2018 22:43:17 +0800
provision: use Prosody 0.10 from upstream repo

3 файлов изменено, 44 вставок(+), 7 удалений(-) [+]
contrib/provision/roles/prosody/files/etc/apt/preferences.d/prosody file | annotate | diff | comparison | revisions
contrib/provision/roles/prosody/tasks/main.yml file | annotate | diff | comparison | revisions
contrib/provision/roles/prosody/tasks/repository.yml file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/provision/roles/prosody/files/etc/apt/preferences.d/prosody Thu Jun 28 22:43:17 2018 +0800
@@ -0,0 +1,7 @@
+Package: prosody*
+Pin: release o=Prosody
+Pin-Priority: 500
+
+Package: *
+Pin: release o=Prosody
+Pin-Priority: 1
--- a/contrib/provision/roles/prosody/tasks/main.yml Thu Jun 28 22:36:32 2018 +0800
+++ b/contrib/provision/roles/prosody/tasks/main.yml Thu Jun 28 22:43:17 2018 +0800
@@ -1,4 +1,6 @@
---
+- include: repository.yml
+
- name: Install server packages
apt:
pkg: '{{ item }}'
@@ -6,7 +8,6 @@
with_items:
- mercurial # for extra modules
- prosody
- - lua-event
- lua-sec
tags: [packages]
@@ -14,13 +15,27 @@
become: yes
become_user: prosody
-- name: Work around default config bug
+- name: Ensure config directories exist
file:
- src: ../../ssl/certs/ssl-cert-snakeoil.pem
- dest: /etc/prosody/certs/localhost.crt
- state: link
- notify:
- - restart prosody
+ path: /etc/prosody/{{ item }}
+ state: directory
+ owner: root
+ group: prosody
+ mode: 0754
+ with_items:
+ - conf.avail
+ - conf.d
+
+- name: Remove default VirtualHosts
+ replace:
+ dest: /etc/prosody/prosody.cfg.lua
+ regexp: '(?ms)^----------- Virtual hosts -----------$.*'
+ replace: ''
+
+- name: Add Include line
+ lineinfile:
+ dest: /etc/prosody/prosody.cfg.lua
+ line: 'Include "conf.d/*.cfg.lua"'
- name: Disable localhost VirtualHost
file:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/provision/roles/prosody/tasks/repository.yml Thu Jun 28 22:43:17 2018 +0800
@@ -0,0 +1,15 @@
+---
+- name: Add Prosody key
+ apt_key:
+ id: 74D9DBB5
+ url: https://prosody.im/files/prosody-debian-packages.key
+
+- name: Add Prosody repository
+ apt_repository:
+ repo: 'deb http://packages.prosody.im/debian {{ ansible_lsb.codename }} main'
+
+- name: Pin packages
+ copy:
+ src: etc/apt/preferences.d/prosody
+ dest: /etc/apt/preferences.d/prosody
+...