diff --git a/roles/remoteit/tasks/enable-or-disable.yml b/roles/remoteit/tasks/enable-or-disable.yml index 2e1ddb36f..a29f26090 100644 --- a/roles/remoteit/tasks/enable-or-disable.yml +++ b/roles/remoteit/tasks/enable-or-disable.yml @@ -1,17 +1,23 @@ -- name: Enable & (Re)Start remote.it's connectd daemon which calls home +- name: Enable & (Re)Start remote.it's daemons {connectd, schannel} systemd: - name: connectd + name: "{{ item }}" daemon_reload: yes enabled: yes state: restarted + with_items: + - connectd + - schannel when: remoteit_enabled -- name: Disable & Stop remote.it's connectd daemon +- name: Disable & Stop remote.it's daemons {connectd, schannel} systemd: - name: connectd + name: "{{ item }}" enabled: no state: stopped + with_items: + - connectd + - schannel when: not remoteit_enabled - name: Identify remoteit service (connector) unit file name, including uuid