organize
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
- name: Install Reticulum Network Stack (RNS)
|
||||
import_tasks: rns.yaml
|
||||
@@ -0,0 +1,129 @@
|
||||
---
|
||||
- name: Create systemd service for rns
|
||||
copy:
|
||||
dest: /etc/systemd/system/rns.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Reticulum Network Stack Daemon
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
User=root
|
||||
ExecStart=rnsd --service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- name: Reload systemd
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Ensure rns service is enabled and started
|
||||
systemd:
|
||||
name: rns.service
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: Stop service for config file update
|
||||
systemd:
|
||||
name: rns.service
|
||||
state: stopped
|
||||
|
||||
- name: Ensure Reticulum config directory exists
|
||||
file:
|
||||
path: /root/.reticulum
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Deploy rns configuration file (using block for friendly file updates)
|
||||
copy:
|
||||
dest: /root/.reticulum/config
|
||||
content: |
|
||||
[reticulum]
|
||||
enable_transport = True
|
||||
share_instance = Yes
|
||||
instance_name = B407
|
||||
discover_interfaces = Yes
|
||||
panic_on_interface_error = No
|
||||
|
||||
# If you're connecting to a large external network, you
|
||||
# can use one or more external blackhole list to block
|
||||
# spammy and excessive announces onto your network. This
|
||||
# funtionality is especially useful if you're hosting public
|
||||
# entrypoints or gateways. The list source below provides a
|
||||
# functional example, but better, more timely maintained
|
||||
# lists probably exist in the community.
|
||||
|
||||
# blackhole_sources = 521c87a83afb8f29e4455e77930b973b
|
||||
|
||||
[logging]
|
||||
# Valid log levels are 0 through 7:
|
||||
# 0: Log only critical information
|
||||
# 1: Log errors and lower log levels
|
||||
# 2: Log warnings and lower log levels
|
||||
# 3: Log notices and lower log levels
|
||||
# 4: Log info and lower (this is the default)
|
||||
# 5: Verbose logging
|
||||
# 6: Debug logging
|
||||
# 7: Extreme logging
|
||||
loglevel = 4
|
||||
|
||||
# The interfaces section defines the physical and virtual
|
||||
# interfaces Reticulum will use to communicate on. This
|
||||
# section will contain examples for a variety of interface
|
||||
# types. You can modify these or use them as a basis for
|
||||
# your own config, or simply remove the unused ones.
|
||||
|
||||
[interfaces]
|
||||
|
||||
[[Default Interface]]
|
||||
type = AutoInterface
|
||||
enabled = Yes
|
||||
[[RNode LoRa Interface]]
|
||||
type = RNodeInterface
|
||||
enabled = yes
|
||||
port = /dev/ttyACM0
|
||||
# Set frequency to 915 MHz (US ISM Band)
|
||||
frequency = 915000000
|
||||
# Set LoRa bandwidth to 125 KHz
|
||||
bandwidth = 125000
|
||||
# Set TX power to 7 dBm (5 mW)
|
||||
txpower = 7
|
||||
# Select spreading factor 8. Valid
|
||||
# range is 7 through 12, with 7
|
||||
# being the fastest and 12 having
|
||||
# the longest range.
|
||||
spreadingfactor = 8
|
||||
# Select coding rate 5. Valid range
|
||||
# is 5 throough 8, with 5 being the
|
||||
# fastest, and 8 the longest range.
|
||||
codingrate = 5
|
||||
# You can configure the RNode to send
|
||||
# out identification on the channel with
|
||||
# a set interval by configuring the
|
||||
# following two parameters.
|
||||
id_callsign = B407
|
||||
id_interval = 600
|
||||
# For certain homebrew RNode interfaces
|
||||
# with low amounts of RAM, using packet
|
||||
# flow control can be useful. By default
|
||||
# it is disabled.
|
||||
# flow_control = False
|
||||
# It is possible to limit the airtime
|
||||
# utilisation of an RNode by using the
|
||||
# following two configuration options.
|
||||
# The short-term limit is applied in a
|
||||
# window of approximately 15 seconds,
|
||||
# and the long-term limit is enforced
|
||||
# over a rolling 60 minute window. Both
|
||||
# options are specified in percent.
|
||||
# airtime_limit_long = 1.5
|
||||
# airtime_limit_short = 33
|
||||
|
||||
- name: Start rns service after config update
|
||||
systemd:
|
||||
name: rns.service
|
||||
state: started
|
||||
Reference in New Issue
Block a user