Apaptions for ansible

This commit is contained in:
Dirk Alders 2023-10-07 16:36:59 +02:00
parent 3c34127656
commit b2c07f2d0a
2 changed files with 12 additions and 4 deletions

View File

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

8
init_venv Executable file
View File

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