bundles/gitea: use metadata.get()

This commit is contained in:
Franzi 2021-09-22 16:38:27 +02:00
parent c2e503d2d5
commit bb8910d15f
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -25,7 +25,7 @@ directories = {
files = {
'/etc/systemd/system/gitea.service': {
'content_type': 'mako',
'context': node.metadata['gitea'],
'context': node.metadata.get('gitea'),
'triggers': {
'action:systemd-reload',
'svc_systemd:gitea:restart',
@ -33,7 +33,7 @@ files = {
},
'/etc/gitea/app.ini': {
'content_type': 'mako',
'context': node.metadata['gitea'],
'context': node.metadata.get('gitea'),
'triggers': {
'svc_systemd:gitea:restart',
},
@ -41,7 +41,7 @@ files = {
'/usr/local/bin/gitea': {
'content_type': 'download',
'source': 'https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-amd64'.format(version=node.metadata['gitea']['version']),
'content_hash': node.metadata['gitea']['sha1'],
'content_hash': node.metadata.get('gitea/sha1', None),
'mode': '0755',
'triggers': {
'svc_systemd:gitea:restart',