This commit is contained in:
aynic.os
2021-07-14 20:38:30 +01:00
parent e1f9ef7de9
commit 3ffea66ba8
101 changed files with 3601 additions and 939 deletions
+22
View File
@@ -0,0 +1,22 @@
---
# file: tasks/services.yml
- name: services - enable/disable hosts services
when: ansible_service_mgr|lower != "openrc"
with_items: "{{ hosts_services|default([]) }}"
service:
name: "{{item.name}}"
state: "{{item.state}}"
enabled: "{{item.enabled}}"
become: yes
- name: services - openrc - enable/disable hosts services
when: ansible_service_mgr|lower == "openrc"
with_items: "{{ hosts_services|default([]) }}"
service:
name: "{{item.name}}"
state: "{{item.state}}"
enabled: "{{item.enabled}}"
runlevel: boot
become: yes