From a04c216abecf511257e0edecf49421d360b4f127 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 17 Feb 2020 20:44:21 +0100 Subject: [PATCH] acertmgr: Use latest package from github instead of git checkout --- roles/acertmgr/tasks/main.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/roles/acertmgr/tasks/main.yml b/roles/acertmgr/tasks/main.yml index 753e30f..6d5ab11 100644 --- a/roles/acertmgr/tasks/main.yml +++ b/roles/acertmgr/tasks/main.yml @@ -3,13 +3,18 @@ - name: Install dependencies apt: name={{ item }} with_items: - - git - - python-cryptography - - python-dnspython - - python-yaml + - python3-cryptography + - python3-dnspython + - python3-yaml + - python3-pkg-resources + +- name: Find current acertmgr version + get_url: url="https://raw.githubusercontent.com/moepman/acertmgr/master/version.txt" dest=/tmp/acertmgr.version + vars: + ansible_connection: local - name: Install acertmgr - git: repo=https://github.com/moepman/acertmgr.git dest=/opt/acertmgr depth=1 version={{ acertmgr_version }} + apt: deb="https://github.com/moepman/acertmgr/releases/download/{{ lookup('file', '/tmp/acertmgr.version') }}/python3-acertmgr_{{ lookup('file', '/tmp/acertmgr.version') }}-1_all.deb" - name: Create config directories file: path=/etc/acertmgr state=directory mode=0755 @@ -21,4 +26,4 @@ file: path=/var/www/acme-challenge/ owner=root mode=0755 state=directory - name: Enable acertmgr cronjob - cron: name=certmgr special_time=daily job=/opt/acertmgr/acertmgr.py + cron: name=certmgr special_time=daily job=/usr/bin/acertmgr