mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
650b8f40ef
9 changed files with 117 additions and 0 deletions
12
roles/remoteit/README.md
Normal file
12
roles/remoteit/README.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Installing Remoteit on a Raspberry Pi
|
||||||
|
1. Set remoteit_install and remoteit_enabled to "True" in /etc/local_vars.yml.
|
||||||
|
2. Run the role that installs remote.it.`
|
||||||
|
```
|
||||||
|
./runroles remoteit
|
||||||
|
```
|
||||||
|
3. The last step installs the remoteit code. But the last part of the install is designed to be interactive, and returns a registration code which i required to make the connection from your remoteit global registration. So run the last step to retrieve and record the registration number.
|
||||||
|
```
|
||||||
|
cd /opt/iiab/downloads
|
||||||
|
apt reinstall ./remoteit-4.13.5.armhf.rpi.deb
|
||||||
|
```
|
||||||
|
4. After you have installed the remote.it client desktop on your laptop, click on the + icon, and enter the registration number displayed in step #3.
|
4
roles/remoteit/defaults/main.yml
Normal file
4
roles/remoteit/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Remote.it allows you to make secure remote connections between two computers.
|
||||||
|
# See https://docs.remote.it/cli/overview for possible values for remoteit_url
|
||||||
|
remoteit_cli_url: https://downloads.remote.it/cli/latest/remoteit_linux_armv7
|
||||||
|
remoteit_device_url: https://downloads.remote.it/remoteit/v4.13.5/remoteit-4.13.5.armhf.rpi.deb
|
16
roles/remoteit/tasks/enable-or-disable.yml
Normal file
16
roles/remoteit/tasks/enable-or-disable.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
- name: Enable & (Re)Start connectd daemon which calls home
|
||||||
|
systemd:
|
||||||
|
name: connectd
|
||||||
|
daemon_reload: yes
|
||||||
|
enabled: yes
|
||||||
|
state: restarted
|
||||||
|
when: remoteit_enabled
|
||||||
|
|
||||||
|
- name: Disable & Stop connectd daemon
|
||||||
|
systemd:
|
||||||
|
name: connectd
|
||||||
|
enabled: no
|
||||||
|
state: stopped
|
||||||
|
when: not remoteit_enabled
|
||||||
|
|
32
roles/remoteit/tasks/install.yml
Normal file
32
roles/remoteit/tasks/install.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
- name: Download the command line interface for this device
|
||||||
|
get_url:
|
||||||
|
url: '{{ remoteit_cli_url }}'
|
||||||
|
dest: /usr/bin/
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Fetch the remoteit device package
|
||||||
|
get_url:
|
||||||
|
url: '{{ remoteit_device_url }}'
|
||||||
|
dest: '{{ downloads_dir }}'
|
||||||
|
|
||||||
|
- name: uninstall the device package
|
||||||
|
apt:
|
||||||
|
name: '{{ remoteit_device_url | basename }}'
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Install the device package
|
||||||
|
apt:
|
||||||
|
deb: '{{ downloads_dir }}/{{ remoteit_device_url | basename }}'
|
||||||
|
state: present
|
||||||
|
|
||||||
|
# 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'
|
37
roles/remoteit/tasks/main.yml
Normal file
37
roles/remoteit/tasks/main.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
- name: Assert that "remoteit_install is sameas true" (boolean not string etc)
|
||||||
|
assert:
|
||||||
|
that: remoteit_install is sameas true
|
||||||
|
fail_msg: "PLEASE SET 'remoteit_install: True' e.g. IN: /etc/iiab/local_vars.yml"
|
||||||
|
quiet: yes
|
||||||
|
|
||||||
|
- name: Assert that "remoteit_enabled | type_debug == 'bool'" (boolean not string etc)
|
||||||
|
assert:
|
||||||
|
that: remoteit_enabled | type_debug == 'bool'
|
||||||
|
fail_msg: "PLEASE GIVE VARIABLE 'remoteit_enabled' A PROPER (UNQUOTED) ANSIBLE BOOLEAN VALUE e.g. IN: /etc/iiab/local_vars.yml"
|
||||||
|
quiet: yes
|
||||||
|
|
||||||
|
|
||||||
|
- name: Install remoteit if 'remoteit_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
|
||||||
|
include_tasks: install.yml
|
||||||
|
when: remoteit_installed is undefined
|
||||||
|
|
||||||
|
|
||||||
|
- include_tasks: enable-or-disable.yml
|
||||||
|
|
||||||
|
|
||||||
|
- name: Add 'remoteit' variable values to {{ iiab_ini_file }}
|
||||||
|
ini_file:
|
||||||
|
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
|
||||||
|
section: remoteit
|
||||||
|
option: "{{ item.option }}"
|
||||||
|
value: "{{ item.value | string }}"
|
||||||
|
with_items:
|
||||||
|
- option: name
|
||||||
|
value: Remote It
|
||||||
|
- option: description
|
||||||
|
value: '"remote.it allows you to make secure remote connections between two computers. Some of the benefits include:
|
||||||
|
Crossing multiple NATs/firewallsUsing a single TCP portportforwardless: without requiring port forwarding in the router, significantly reducing your network''s vulnerability."'
|
||||||
|
- option: remoteit_install
|
||||||
|
value: "{{ remoteit_install }}"
|
||||||
|
- option: remoteit_enabled
|
||||||
|
value: "{{ remoteit_enabled }}"
|
|
@ -109,6 +109,10 @@ dns_jail_enabled: False
|
||||||
sshd_install: True # Required by OpenVPN
|
sshd_install: True # Required by OpenVPN
|
||||||
sshd_enabled: True
|
sshd_enabled: True
|
||||||
|
|
||||||
|
# Remote.it allows you to make secure remote connections between two computers.
|
||||||
|
remoteit_install: True
|
||||||
|
remoteit_enabled: False
|
||||||
|
|
||||||
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
||||||
openvpn_install: True
|
openvpn_install: True
|
||||||
openvpn_enabled: False
|
openvpn_enabled: False
|
||||||
|
|
|
@ -109,6 +109,10 @@ dns_jail_enabled: False
|
||||||
sshd_install: True # Required by OpenVPN
|
sshd_install: True # Required by OpenVPN
|
||||||
sshd_enabled: True
|
sshd_enabled: True
|
||||||
|
|
||||||
|
# Remote.it allows you to make secure remote connections between two computers.
|
||||||
|
remoteit_install: True
|
||||||
|
remoteit_enabled: False
|
||||||
|
|
||||||
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
||||||
openvpn_install: True
|
openvpn_install: True
|
||||||
openvpn_enabled: False
|
openvpn_enabled: False
|
||||||
|
|
|
@ -109,6 +109,10 @@ dns_jail_enabled: False
|
||||||
sshd_install: True # Required by OpenVPN
|
sshd_install: True # Required by OpenVPN
|
||||||
sshd_enabled: True
|
sshd_enabled: True
|
||||||
|
|
||||||
|
# Remote.it allows you to make secure remote connections between two computers.
|
||||||
|
remoteit_install: True
|
||||||
|
remoteit_enabled: False
|
||||||
|
|
||||||
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
||||||
openvpn_install: True
|
openvpn_install: True
|
||||||
openvpn_enabled: False
|
openvpn_enabled: False
|
||||||
|
|
|
@ -109,6 +109,10 @@ dns_jail_enabled: False
|
||||||
sshd_install: True # Required by OpenVPN
|
sshd_install: True # Required by OpenVPN
|
||||||
sshd_enabled: True
|
sshd_enabled: True
|
||||||
|
|
||||||
|
# Remote.it allows you to make secure remote connections between two computers.
|
||||||
|
remoteit_install: True
|
||||||
|
remoteit_enabled: False
|
||||||
|
|
||||||
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
# SECURITY WARNING: See http://wiki.laptop.org/go/IIAB/Security
|
||||||
openvpn_install: True
|
openvpn_install: True
|
||||||
openvpn_enabled: True
|
openvpn_enabled: True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue