Update role acertmgr add var acertmgr_version

Defining variable acertmgr_version from role defaults, allows version
string to be overridden. Role defaults are set in connection: local scope.
This also shortens long line to make this role linter compliant
This commit is contained in:
Jan 2020-06-20 22:36:29 +02:00 committed by Markus Hauschild
parent 8f2701b48a
commit 22372c931d
2 changed files with 4 additions and 8 deletions

View File

@ -0,0 +1,3 @@
---
acertmgr_version: "{{ lookup('url', 'https://raw.githubusercontent.com/moepman/acertmgr/master/version.txt') | trim }}"

View File

@ -8,16 +8,9 @@
- 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
apt:
deb: "https://github.com/moepman/acertmgr/releases/download/{{ lookup('file', '/tmp/acertmgr.version') }}/python3-acertmgr_{{ lookup('file', '/tmp/acertmgr.version') }}-1_all.deb"
deb: "https://github.com/moepman/acertmgr/releases/download/{{ acertmgr_version }}/python3-acertmgr_{{ acertmgr_version }}-1_all.deb"
- name: Create config directories
file: