From 21ca2fb0a9dbe290a19ed7059f120825b63439c5 Mon Sep 17 00:00:00 2001 From: Zolfa Date: Sat, 6 Jun 2020 00:14:50 +0200 Subject: [PATCH] roles/service: linux alpine support --- roles/service/tasks/main.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/service/tasks/main.yaml b/roles/service/tasks/main.yaml index d4b4e9e..7c331b0 100644 --- a/roles/service/tasks/main.yaml +++ b/roles/service/tasks/main.yaml @@ -14,7 +14,19 @@ service: name: '{{ service_name }}' enabled: true - when: ansible_distribution != 'openwrt' + when: ansible_distribution == 'Debian' + +- block: + - name: 'ALPINE | install package' + apk: + name: '{{ service_packages|join(",") }}' + state: 'present' + update_cache: true + - name: 'ALPINE | start service at boot' + service: + name: '{{ service_name }}' + enabled: true + when: ansible_distribution == 'Alpine' - block: - name: 'OPENWRT | install {{ service_name }}'