-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.yml
75 lines (71 loc) · 1.88 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
# Rpi SDR Server deploy playbook
- name: prompt for required variables
hosts: localhost
gather_facts: false
vars_prompt:
- name: target_host
prompt: Enter target rpi ip address
default: "172.17.0.2"
private: false
- name: target_port
prompt: Enter target rpi ssh port
default: "22"
private: false
- name: target_user
prompt: Enter target rpi ssh user
default: "pi"
private: false
- name: target_passwd
prompt: Enter target rpi ssh password
default: "raspberry"
private: true
- name: bot_token
prompt: Enter telegram bot token
private: false
- name: bot_owner
prompt: Enter telegram bot owner id
private: false
- name: bot_group
prompt: Enter telegram bot group id
private: false
tasks:
- name: save host value
add_host:
name: "{{ target_host }}"
groups: rpisdr
- name: save ssh values
add_host:
name: login
port: "{{ target_port }}"
username: "{{ target_user }}"
password: "{{ target_passwd }}"
- name: save bot values
add_host:
name: telegram
token: "{{ bot_token }}"
ownerid: "{{ bot_owner }}"
groupid: "{{ bot_group }}"
- name: deploy rpi sdr server
hosts: rpisdr
vars:
ansible_port: "{{ hostvars['login']['port'] }}"
ansible_user: "{{ hostvars['login']['username'] }}"
ansible_password: "{{ hostvars['login']['password'] }}"
telegram_bot_token: "{{ hostvars['telegram']['token'] }}"
telegram_bot_owner: "{{ hostvars['telegram']['ownerid'] }}"
telegram_bot_group: "{{ hostvars['telegram']['groupid'] }}"
roles:
- basedeps
- baseconfs
- telegrambot
- rtl-sdr
- kalibrate
- calibrate
- spyserver
- rtl433
- airband
post_tasks:
- name: Done! Rebooting...
become: true
reboot: