-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathmounts.yml
More file actions
42 lines (40 loc) · 1.31 KB
/
Copy pathmounts.yml
File metadata and controls
42 lines (40 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Author(s): Admin9705 - Deiteq
# URL: https://plexguide.com - http://github.plexguide.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
vars:
service_vars:
- {name: crypt.service}
- {name: pgdrive.service}
- {name: gdrive.service}
- {name: gcrypt.service}
- {name: tdrive.service}
- {name: tcrypt.service}
- {name: supertransfer2.service}
- {name: unionfs.service}
- {name: move.service}
- {name: pgblitz.service}
- {name: plexdrive.service}
- {name: st2monitor.service}
tasks:
- name: Checking Existing Service Name
stat:
path: "/etc/systemd/system/{{ item.name }}"
with_items: "{{ service_vars }}"
register: check_service_name
- name: Stop If Service Is Running
systemd: state=stopped name={{ item.item.name }} daemon_reload=yes enabled=no
with_items: "{{ check_service_name.results }}"
when: item.stat.exists
- name: Remove Services
file:
path: "/etc/systemd/system/{{ item.item.name }}"
state: absent
with_items: "{{ check_service_name.results }}"
when: item.stat.exists