Browse Source

roles/service: linux alpine support

python3
Zolfa 5 years ago
parent
commit
21ca2fb0a9
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      roles/service/tasks/main.yaml

+ 13
- 1
roles/service/tasks/main.yaml View File

@ -14,7 +14,19 @@
service: service:
name: '{{ service_name }}' name: '{{ service_name }}'
enabled: true 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: - block:
- name: 'OPENWRT | install {{ service_name }}' - name: 'OPENWRT | install {{ service_name }}'


Loading…
Cancel
Save