updated syncthing state

This commit is contained in:
Paul 2021-05-17 10:57:21 +02:00
parent ffa1e0a1aa
commit c69475655f
4 changed files with 4 additions and 28 deletions

View File

@ -1,24 +0,0 @@
---
{%- from "syncthing/map.jinja" import syncthing with context %}
{%- set configdir=salt['user.info'](syncthing.user)['home'] + '/.config/syncthing' %}
#syncthing-config-dir:
# file.directory:
# - name: {{ configdir }}
# - makedirs: true
# - watch_in:
# - service: syncthing-service
#syncthing-config-file:
# file.managed:
# - name: {{ configdir }}/config.xml
# - source: salt://syncthing/config.xml.j2
# - user: root
# - group: root
# - template: jinja
# - watch_in:
# - service: syncthing-service
{%- set config = salt['http.query'](url="http://localhost:8384/rest/system/config", header_dict={"X-API-Key":syncthing.apikey},decode=True, decode_type='json') %}
#{{ config['dict']['gui'] }}
{%- do salt['http.query'](method='POST', url="http://localhost:8384/rest/system/config", header_dict={"X-API-Key":syncthing.apikey}, decode=True, decode_type='json', data=json.dumps(syncthing.config)) %}

View File

@ -13,5 +13,5 @@ syncthing:
config:
gui:
address: "0.0.0.0:8384"
user: "paul"
password: "$2a$10$NeZ3cfyOgZcdMGy9ixB7LOAP6z8tCOVjico6ZGLoK2QIQy734qPw."
user: "username"
password: "$2a$10$NeZ3cfyOgZcdMGy9ixB7LOAP6z8tCOVjico6ZGLoK2QIQy734qPw."

View File

@ -1,3 +1,3 @@
---
Linux:
os: "linux"
os: "linux"

View File

@ -18,4 +18,4 @@ armv7l:
arch: "arm"
armhf:
arch: "arm"
arch: "arm"