add playbooks
This commit is contained in:
14
linux/service_start.yml
Normal file
14
linux/service_start.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
- hosts: "{{ HOSTS }}"
|
||||
vars:
|
||||
service_name: undef
|
||||
|
||||
tasks:
|
||||
- name: Check Service
|
||||
service_facts:
|
||||
|
||||
- name: Start Service
|
||||
service:
|
||||
name: "{{ service_name }}"
|
||||
state: started
|
||||
when: service_name + '.service' in services
|
||||
Reference in New Issue
Block a user