mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
- name: Fail if we detect unknown architecture
|
|
fail:
|
|
msg: "Could not find an apt package for the CPU architecture \"{{ ansible_architecture }}\""
|
|
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"
|
|
|
|
- name: Download {{ remoteit_cli_url }} for the {{ remoteit_iset_suffix2 }} arch of this device to /usr/bin/remoteit (755)
|
|
get_url:
|
|
url: '{{ remoteit_cli_url }}'
|
|
dest: /usr/bin/
|
|
mode: 0755
|
|
|
|
- name: Download {{ remoteit_device_url }} for the {{ remoteit_iset_suffix }} arch of this device package to {{ downloads_dir }}
|
|
get_url:
|
|
url: '{{ remoteit_device_url }}'
|
|
dest: '{{ downloads_dir }}/'
|
|
|
|
- name: Uninstall the device package {{ remoteit_deb }}
|
|
apt:
|
|
name: '{{ remoteit_deb }}'
|
|
state: absent
|
|
|
|
- name: Install device package {{ downloads_dir }}/{{ remoteit_deb }}
|
|
apt:
|
|
deb: '{{ downloads_dir }}/{{ remoteit_deb }}'
|
|
state: present
|
|
|
|
|
|
# RECORD remoteit AS INSTALLED
|
|
|
|
- name: "Set 'remoteit_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'
|