From a948cc141f8c9ad25f03d7a6a22c3409371f350a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 17 May 2021 21:22:01 +0100 Subject: [PATCH] Install latest prosody from deb, factor out variables --- ansible/snikket.yml | 6 ++++++ ansible/tasks/prosody.yml | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ansible/snikket.yml b/ansible/snikket.yml index 1e5dac6..0722bc3 100644 --- a/ansible/snikket.yml +++ b/ansible/snikket.yml @@ -4,6 +4,12 @@ - hosts: all become: yes gather_facts: no + vars: + prosody: + package: "prosody-trunk" + build: "1436" + prosody_modules: + revision: "b88f05c878ac" tasks: - import_tasks: tasks/prosody.yml - import_tasks: tasks/supervisor.yml diff --git a/ansible/tasks/prosody.yml b/ansible/tasks/prosody.yml index 2a71bdc..0b404ed 100644 --- a/ansible/tasks/prosody.yml +++ b/ansible/tasks/prosody.yml @@ -11,9 +11,12 @@ - name: "Add Prosody package repo" apt_repository: repo: "deb https://packages.prosody.im/debian buster main" +- name: "Detect dpkg architecture name" + shell: dpkg --print-architecture + register: dpkg_arch - name: "Install Prosody package" apt: - name: prosody-trunk + deb: "https://packages.prosody.im/debian/pool/main/p/{{ prosody.package }}/{{ prosody.package }}_1nightly{{ prosody.build }}-1~buster_{{ dpkg_arch.stdout }}.deb" state: present install_recommends: yes - name: "Deploy Prosody config" @@ -64,7 +67,7 @@ hg: repo: https://hg.prosody.im/prosody-modules dest: /usr/local/lib/prosody-modules - revision: b88f05c878ac + revision: "{{ prosody_modules.revision }}" purge: yes update: yes - name: Enable wanted modules (prosody-modules)