Browse Source

Apaptions for ansible

master
Dirk Alders 1 year ago
parent
commit
b2c07f2d0a
2 changed files with 12 additions and 4 deletions
  1. 4
    4
      config_example/config.py
  2. 8
    0
      init_venv

+ 4
- 4
config_example/config.py View File

@@ -5,10 +5,10 @@ import report
5 5
 
6 6
 __BASEPATH__ = os.path.abspath(os.path.dirname(__file__))
7 7
 
8
-MQTT_USER = "mqtt_username"
9
-MQTT_PASS = "mqtt_password"
10
-MQTT_SERVER = "mqtt_server"
11
-MQTT_TOPIC = "mqtt_topic"
8
+MQTT_SERVER = "<mqtt_smarthome_hostname>"
9
+MQTT_USER = "<mqtt_smarthome_username>"
10
+MQTT_PASS = "<mqtt_smarthome_password>"
11
+MQTT_TOPIC = "<mqtt_ambient_info_topic>"
12 12
 
13 13
 DAT_PATH_DHT = None     # os.path.join(__BASEPATH__, 'dat', 'dht')
14 14
 DAT_PATH_BMP = None     # os.path.join(__BASEPATH__, 'dat', 'bmp')

+ 8
- 0
init_venv View File

@@ -0,0 +1,8 @@
1
+#!/bin/sh
2
+#
3
+BASEPATH=`realpath $(dirname $0)`
4
+
5
+python3 -m venv $BASEPATH/venv
6
+$BASEPATH/venv/bin/pip install --upgrade pip
7
+find $BASEPATH -name requirements.txt | xargs -L 1 $BASEPATH/venv/bin/pip install -r
8
+$BASEPATH/venv/bin/pip list --outdated --format=json | jq -r '.[] | .name'|xargs -n1 $BASEPATH/venv/bin/pip install -U

Loading…
Cancel
Save