2022-04-04 04:04:19 +00:00
- name : Enable & Restart remote.it "parent" service connectd, which exits after spawning 2 "child" services/daemons below
2021-10-25 18:59:16 +00:00
systemd :
2022-04-04 02:58:28 +00:00
name : connectd
2021-10-25 18:59:16 +00:00
daemon_reload : yes
enabled : yes
2022-04-04 02:58:28 +00:00
state : restarted
when : remoteit_enabled
2022-04-04 04:04:19 +00:00
- name : Enable remote.it daemon schannel ("Remote tcp command service") -- try to avoid contention with connectd which auto-spawns it as nec (just above)
2022-04-04 02:58:28 +00:00
systemd :
name : schannel
enabled : yes
state : started
2021-10-27 21:52:19 +00:00
when : remoteit_enabled
2021-10-25 18:59:16 +00:00
2021-10-29 01:26:26 +00:00
2022-04-04 02:58:28 +00:00
- name : Disable & Stop remote.it services {connectd, schannel}
2021-10-29 01:26:26 +00:00
systemd :
2022-04-03 04:57:47 +00:00
name : "{{ item }}"
2021-10-29 01:26:26 +00:00
enabled : no
state : stopped
2022-04-03 04:57:47 +00:00
with_items :
- connectd
- schannel
2021-10-29 04:11:56 +00:00
when : not remoteit_enabled
2021-10-29 01:26:26 +00:00
2022-04-06 03:19:43 +00:00
- name : Stop & Disable remoteit@* "Remote tcp connection services" (typically 1-3 of these) found in /etc/systemd/system/multi-user.target.wants/ e.g. remoteit@80:00:01:7F:7E:00:56:36.service
2022-04-06 02:06:18 +00:00
shell : |
systemctl stop $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@*)
systemctl disable $(ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@*)
2021-10-29 04:11:56 +00:00
ignore_errors : yes
2022-04-06 02:06:18 +00:00
when : not remoteit_enabled
2021-10-29 04:11:56 +00:00
2022-04-06 02:06:18 +00:00
# - name: Identify remoteit "Remote tcp connection service" unit file name, including uuid, e.g. remoteit@80:00:01:7F:7E:00:56:36.service
# shell: ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@
# register: remoteit_service
# ignore_errors: yes
# - name: "Disable & Stop the actual service: {{ remoteit_service.stdout }}"
# systemd:
# name: "{{ remoteit_service.stdout }}"
# enabled: no
# state: stopped
# when: not remoteit_enabled and remoteit_service.stdout != ""
# ignore_errors: yes