Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
869 B

---
- block:
- name: 'DEBIAN | install {{ service_name }}'
apt:
pkg: '{{ service_packages }}'
state: 'present'
update_cache: true
cache_valid_time: 3600
install_recommends: '{{ install_recommends | default("no") }}'
tags:
- 'packages'
- name: 'DEBIAN | start {{ service_name }} at boot'
service:
name: '{{ service_name }}'
enabled: true
when: ansible_distribution != 'openwrt'
- block:
- name: 'OPENWRT | install {{ service_name }}'
opkg:
name: '{{ item }}'
state: 'present'
update_cache: true
loop: '{{ service_packages|flatten(levels=1) }}'
tags:
- 'packages'
- name: 'OPENWRT | start {{ service_name }} at boot'
openwrt_init:
name: '{{ service_name }}{{ "d" if service_name=="ssh" }}'
enabled: true
when: ansible_distribution == 'openwrt'