2021-10-28 07:09:24 +00:00
|
|
|
- name: Fail if we detect unknown architecture
|
|
|
|
fail:
|
2021-10-28 07:19:35 +00:00
|
|
|
msg: "Could not find an apt package for the CPU architecture \"{{ ansible_architecture }}\""
|
2021-10-28 07:09:24 +00:00
|
|
|
when: remoteit_iset_suffix == "unknown"
|
|
|
|
|
|
|
|
- name: Fail if we detect unknown architecture
|
|
|
|
fail:
|
|
|
|
msg: "Could not find a binary for the CPU architecture \"{{ ansible_architecture }}\""
|
|
|
|
when: remoteit_iset_suffix2 == "unknown"
|
|
|
|
|
2021-10-27 23:10:09 +00:00
|
|
|
- name: Download the command line interface for this device to /usr/bin/{{ remoteit_cli_url }} (755)
|
2021-10-25 18:59:16 +00:00
|
|
|
get_url:
|
2021-10-27 23:10:09 +00:00
|
|
|
url: '{{ remoteit_cli_url }}'
|
|
|
|
dest: /usr/bin/
|
|
|
|
mode: 0755
|
2021-10-25 18:59:16 +00:00
|
|
|
|
2021-10-28 12:42:51 +00:00
|
|
|
- name: Download {{ remoteit_device_url }} device package to {{ downloads_dir }}/
|
2021-10-27 21:29:31 +00:00
|
|
|
get_url:
|
2021-10-27 23:10:09 +00:00
|
|
|
url: '{{ remoteit_device_url }}'
|
2021-10-28 09:23:28 +00:00
|
|
|
dest: '{{ downloads_dir }}/'
|
2021-10-27 21:29:31 +00:00
|
|
|
|
2021-10-28 12:42:51 +00:00
|
|
|
- name: Uninstall the device package {{ remoteit_deb }}
|
2021-10-27 21:29:31 +00:00
|
|
|
apt:
|
2021-10-28 09:23:28 +00:00
|
|
|
name: '{{ remoteit_deb }}'
|
2021-10-27 23:10:09 +00:00
|
|
|
state: absent
|
|
|
|
|
2021-10-28 09:23:28 +00:00
|
|
|
- name: Install device package {{ downloads_dir }}/{{ remoteit_deb }}
|
2021-10-25 18:59:16 +00:00
|
|
|
apt:
|
2021-10-28 09:23:28 +00:00
|
|
|
deb: '{{ downloads_dir }}/{{ remoteit_deb }}'
|
2021-10-27 23:10:09 +00:00
|
|
|
state: present
|
|
|
|
|
2021-10-25 18:59:16 +00:00
|
|
|
|
|
|
|
# RECORD remoteit AS INSTALLED
|
|
|
|
|
|
|
|
- name: "Set 'openvpn_installed: True'"
|
|
|
|
set_fact:
|
|
|
|
remoteit_installed: True
|
|
|
|
|
|
|
|
- name: "Add 'remoteit_installed: True' to {{ iiab_state_file }}"
|
|
|
|
lineinfile:
|
|
|
|
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
|
|
|
regexp: '^remoteit_installed'
|
|
|
|
line: 'remoteit_installed: True'
|