mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
Merge branch 'claim' of https://github.com/jvonau/iiab into remoteit_license_key
This commit is contained in:
commit
c8769a8ea6
4 changed files with 18 additions and 1 deletions
|
@ -49,3 +49,4 @@ cli_suffixes:
|
||||||
x86_64: x86_64
|
x86_64: x86_64
|
||||||
remoteit_cli_suffix: "{{ cli_suffixes[ansible_architecture] | default('unknown') }}"
|
remoteit_cli_suffix: "{{ cli_suffixes[ansible_architecture] | default('unknown') }}"
|
||||||
remoteit_cli_url: https://downloads.remote.it/cli/latest/remoteit_linux_{{ remoteit_cli_suffix }}
|
remoteit_cli_url: https://downloads.remote.it/cli/latest/remoteit_linux_{{ remoteit_cli_suffix }}
|
||||||
|
remoteit_REGISTRATION_CODE: none #eg "592AA9BB-68C8-520A-AACA-6E27654C3DF6" generated in the desktop or web portal
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
- name: Using pre-created REGISTRATION_CODE from desktop or web portal
|
||||||
|
shell: echo {{ remoteit_REGISTRATION_CODE }} > /etc/remoteit/registration
|
||||||
|
when: remoteit_REGISTRATION_CODE is not none
|
||||||
|
|
||||||
- name: Enable & Restart remote.it "parent" service connectd, which exits after spawning 2 "child" services/daemons below
|
- name: Enable & Restart remote.it "parent" service connectd, which exits after spawning 2 "child" services/daemons below
|
||||||
systemd:
|
systemd:
|
||||||
name: connectd
|
name: connectd
|
||||||
|
@ -31,6 +35,10 @@
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: not remoteit_enabled
|
when: not remoteit_enabled
|
||||||
|
|
||||||
|
- name: Clean up REGISTRATION_CODE from {{ iiab_local_vars_file }} if used
|
||||||
|
shell: sed -i '/remoteit_REGISTRATION_CODE/d' {{ iiab_local_vars_file }}
|
||||||
|
when: remoteit_REGISTRATION_CODE is not none
|
||||||
|
|
||||||
# - name: Identify remoteit "Remote tcp connection service" unit file name, including uuid, e.g. remoteit@80:00:01:7F:7E:00:56:36.service
|
# - 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@
|
# shell: ls /etc/systemd/system/multi-user.target.wants/ | grep remoteit@
|
||||||
# register: remoteit_service
|
# register: remoteit_service
|
||||||
|
|
|
@ -32,10 +32,13 @@
|
||||||
# apt:
|
# apt:
|
||||||
# deb: "{{ remoteit_device_url }}"
|
# deb: "{{ remoteit_device_url }}"
|
||||||
|
|
||||||
|
- name: Going to use pre-created REGISTRATION_CODE from desktop or web portal
|
||||||
|
shell: mkdir /etc/remoteit || true && touch /etc/remoteit/registration
|
||||||
|
when: remoteit_REGISTRATION_CODE is not none
|
||||||
|
|
||||||
- name: Install remote.it Device Package for your CPU/OS, using https://downloads.remote.it/remoteit/install_agent.sh -- this puts a claim code in /etc/remoteit/config.json which is valid for 24h
|
- name: Install remote.it Device Package for your CPU/OS, using https://downloads.remote.it/remoteit/install_agent.sh -- this puts a claim code in /etc/remoteit/config.json which is valid for 24h
|
||||||
shell: curl -L https://downloads.remote.it/remoteit/install_agent.sh | sh
|
shell: curl -L https://downloads.remote.it/remoteit/install_agent.sh | sh
|
||||||
|
|
||||||
|
|
||||||
- name: Install /usr/bin/iiab-remoteit from template -- so IIAB operators can quickly enable remote.it AND generate a new remote.it claim code (in /etc/remoteit/config.json) -- optionally downloading + installing the very latest Device Package (like the 2 steps above)
|
- name: Install /usr/bin/iiab-remoteit from template -- so IIAB operators can quickly enable remote.it AND generate a new remote.it claim code (in /etc/remoteit/config.json) -- optionally downloading + installing the very latest Device Package (like the 2 steps above)
|
||||||
template:
|
template:
|
||||||
src: iiab-remoteit
|
src: iiab-remoteit
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
|
|
||||||
- include_tasks: enable-or-disable.yml
|
- include_tasks: enable-or-disable.yml
|
||||||
|
|
||||||
|
- name: Find the claim code if blank the machine was registrated
|
||||||
|
shell: grep claim /etc/remoteit/config.json | rev | cut -d\" -f2 | rev
|
||||||
|
register: remoteit_claim
|
||||||
|
|
||||||
- name: Add 'remoteit' variable values to {{ iiab_ini_file }}
|
- name: Add 'remoteit' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
|
@ -34,3 +37,5 @@
|
||||||
value: "{{ remoteit_install }}"
|
value: "{{ remoteit_install }}"
|
||||||
- option: remoteit_enabled
|
- option: remoteit_enabled
|
||||||
value: "{{ remoteit_enabled }}"
|
value: "{{ remoteit_enabled }}"
|
||||||
|
- option: remoteit_claim_code
|
||||||
|
value: "{{ remoteit_claim.stdout }}"
|
||||||
|
|
Loading…
Reference in a new issue