aboutsummaryrefslogtreecommitdiffstats
path: root/roles/doorputer
diff options
context:
space:
mode:
Diffstat (limited to 'roles/doorputer')
-rw-r--r--roles/doorputer/tasks/lockserver.yml3
-rw-r--r--roles/doorputer/vars/main.yml22
2 files changed, 14 insertions, 11 deletions
diff --git a/roles/doorputer/tasks/lockserver.yml b/roles/doorputer/tasks/lockserver.yml
index 033e80d..a9122d1 100644
--- a/roles/doorputer/tasks/lockserver.yml
+++ b/roles/doorputer/tasks/lockserver.yml
@@ -46,6 +46,8 @@
mode: 0700
- name: Create lockserver.ini
+ vars:
+ lockserver_conf: '{{ lockserver_conf_role|combine(lockserver_conf_secrets) }}'
ini_file:
path: '~doorman/.config/lockserver.ini'
section: "{{ item.key.split('.',1)[0] }}"
@@ -56,6 +58,7 @@
group: users
mode: 0600
with_dict: '{{ lockserver_conf }}'
+ when: lockserver_conf_secrets|length > 0
- name: Install lockserver service
copy:
diff --git a/roles/doorputer/vars/main.yml b/roles/doorputer/vars/main.yml
index e2fb021..4d7f336 100644
--- a/roles/doorputer/vars/main.yml
+++ b/roles/doorputer/vars/main.yml
@@ -1,15 +1,7 @@
---
hostname: 'doorputer'
-users:
- 'esmil': sudo
- 'ast': sudo
- 'flummer': sudo
- 'riiiis': sudo
- 'knielsen': sudo
- 'signout': sudo
-
-apt_sources:
+apt_sources_role:
raspbian:
components:
- main
@@ -17,14 +9,22 @@ apt_sources:
- non-free
- rpi
-apt_packages:
+apt_packages_role:
'git': present # to check out lockserver repo
# lockserver dependencies
'python3-serial': present
'sqlite3': present
-lockserver_conf:
+users:
+ 'esmil': sudo
+ 'ast': sudo
+ 'flummer': sudo
+ 'riiiis': sudo
+ 'knielsen': sudo
+ 'signout': sudo
+
+lockserver_conf_role:
'Database.Path': '/home/doorman/users.db'
'Serial.Device': '/dev/ttyUSB0'
'Daymode.GPIONumber': '2'