Skip to content

Commit

Permalink
add ham foundations and aprs readonly igate config
Browse files Browse the repository at this point in the history
  • Loading branch information
bhcleek committed Jan 16, 2021
1 parent 4486555 commit efddc94
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 0 deletions.
8 changes: 8 additions & 0 deletions group_vars/ham/vault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ANSIBLE_VAULT;1.1;AES256
38363938633535396435376538653961396661353764646531373135626237303531326131373030
3362366163653939336166623265663161333732656261310a663562633630316338373134363162
31656131326237623662613137366333646332383530316234303130643933366265623262643936
3534626333373836610a343361623065316239663734623364653339313637666537613062316332
61616436646464346466343262303935386435313363653737316130613536646135336462303332
64636435663330393639643964343964323531386137653733636566303733373865396364373937
636337646261313539666634643232376336
6 changes: 6 additions & 0 deletions home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ all:
ham:
hosts:
hifi:
sdr_igate:
login: "{{ vault_igate_login }}"
passcode: "{{ vault_igate_passcode }}"
call: K7BCX-10
lat: "45.568449N"
long: "122.670984W"
25 changes: 25 additions & 0 deletions roles/aprs-igate/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- name: ham packages
ansible.builtin.apt:
name:
- extra-xdg-menus
update_cache: yes
cache_valid_time: 86400
state: latest
become: yes
tags:
aprs-igate

#- name: modify categories for direwolf.desktop
# lineinfile:
# path: /usr/local/share/applications/direwolf.desktop
# regexp: '^Categories=HamRadio'
# line: Categories=HamRadio;APRS
# become: yes

- name: sdr-igate.conf
template:
src: sdr-igate.conf.tmpl
dest: sdr-igate.conf
tags:
aprs-igate
31 changes: 31 additions & 0 deletions roles/aprs-igate/templates/sdr-igate.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# configuration for SDR read-only IGate.
#

# We might not have an audio output device so set to null.
# We will override the input half on the command line.
ADEVICE stdin null
CHANNEL 0
MYCALL {{ sdr_igate.call }}

# First you need to specify the name of a Tier 2 server.
# The current preferred way is to use one of these regional rotate addresses:

# noam.aprs2.net - for North America
# soam.aprs2.net - for South America
# euro.aprs2.net - for Europe and Africa
# asia.aprs2.net - for Asia
# aunz.aprs2.net - for Oceania

IGSERVER {{ sdr_igate.tier2_server | default('noam.aprs2.net') }}

# You also need to specify your login name and passcode.
# Contact the author if you can't figure out how to generate the passcode.

IGLOGIN {{ sdr_igate.login }} {{ sdr_igate.passcode }}

# That's all you need for a receive only IGate which relays
# messages from the local radio channel to the global servers.

# beacon APRS-IS directly
PBEACON sendto=IG delay=1 every=30 overlay=R symbol="igate" lat={{ sdr_igate.lat }} long={{ sdr_igate.long }} height=20 comment="receive only igate"
75 changes: 75 additions & 0 deletions roles/ham/tasks/direwolf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
- name: remove pulseaudio
ansible.builtin.apt:
name:
- pulseaudio
purge: yes
state: absent

- name: direwolf dependencies
ansible.builtin.apt:
name:
- git
- gcc
- g++
- make
- cmake
- libasound2-dev
- libudev-dev
update_cache: yes
cache_valid_time: 86400
state: latest
become: yes

- name: create src directory
file:
path: "{{ ansible_env.HOME }}/src"
state: directory

- name: clone direwolf repo
git:
repo: https://github.com/wb2osz/direwolf
dest: "{{ ansible_env.HOME }}/src/direwolf"

- name: checkout direwolf sources
shell: git checkout master
args:
chdir: "{{ ansible_env.HOME }}/src/direwolf"

- name: create direwolf build directory
file:
path: "{{ ansible_env.HOME }}/src/direwolf/build"
state: directory

- name: build direwolf cmakefiles
command: cmake ..
args:
chdir: "{{ ansible_env.HOME }}/src/direwolf/build"

- name: build direwolf
command: make
args:
chdir: "{{ ansible_env.HOME }}/src/direwolf/build"

- name: install direwolf
command: make install
args:
chdir: "{{ ansible_env.HOME }}/src/direwolf/build"
become: yes

- name: check for direwolf.conf
stat:
path: "{{ ansible_env.HOME}}/direwolf.conf"
register: stat_result

- name: direwolf install-conf
command: make install-conf
args:
chdir: "{{ ansible_env.HOME }}/src/direwolf/build"
become: yes
when: not stat_result.stat.exists

- name: remove direwolf build directory
file:
path: "{{ ansible_env.HOME }}/src/direwolf/build"
state: absent
22 changes: 22 additions & 0 deletions roles/ham/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
- name: ham packages
ansible.builtin.apt:
name:
- hamradio-antenna
- hamradio-datamodes
- hamradio-digitalvoice
- hamradio-logging
- hamradio-morse
- hamradio-packetmodes
- hamradio-rigcontrol
- hamradio-satellite
- hamradio-sdr
- hamradio-tools
- hamradio-training
- extra-xdg-menus
update_cache: yes
cache_valid_time: 86400
state: latest
become: yes

- import_playbook: direwolf.yml
7 changes: 7 additions & 0 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@
- file-server
tags:
- media

- name: ham
hosts: ham
roles:
- aprs-igate
tags:
- ham

0 comments on commit efddc94

Please sign in to comment.