generic-worker on macOS: configure livelog

This commit is contained in:
Simon Sapin 2018-11-12 22:34:33 +01:00
parent a5089885ac
commit ff1e2c2394
4 changed files with 32 additions and 12 deletions

View file

@ -12,5 +12,5 @@ def ext_pillar(_minion_id, _pillar, *_args):
tc.check()
data = {}
data.update(tc.secret("project/servo/tc-client/worker/macos/1"))
data.update(tc.secret("project/servo/livelog-secret/1"))
data.update(tc.livelog())
return data

View file

@ -28,7 +28,6 @@
{{ home }}/config.json:
file.serialize:
- makedirs: True
- user: {{ user }}
- mode: 600
- show_changes: False
@ -43,10 +42,25 @@
signingKeyLocation: {{ home }}/key
clientId: {{ pillar["client_id"] }}
accessToken: {{ pillar["access_token"] }}
livelogExecutable: {{ bin }}/livelog
livelogCertificate: {{ home }}/livelog.crt
livelogKey: {{ home }}/livelog.key
livelogSecret: {{ pillar["livelog_secret"] }}
- watch_in:
- service: net.generic.worker
{{ home }}/livelog.crt:
file.managed:
- contents_pillar: livelog_cert
- user: {{ user }}
- mode: 600
{{ home }}/livelog.key:
file.managed:
- contents_pillar: livelog_key
- user: {{ user }}
- mode: 600
{{ bin }}/generic-worker new-openpgp-keypair --file {{ home }}/key:
cmd.run:
- creates: {{ home }}/key