2020-08-20 13:34:27 +00:00
|
|
|
downloads = {
|
|
|
|
'/usr/local/bin/gitea': {
|
|
|
|
'url': 'https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-amd64'.format(version=node.metadata['gitea']['version']),
|
|
|
|
'sha256': node.metadata['gitea']['sha256'],
|
2020-09-04 19:06:13 +00:00
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:gitea:restart',
|
|
|
|
},
|
2020-08-20 13:34:27 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2020-11-10 12:23:22 +00:00
|
|
|
users = {
|
|
|
|
'git': {},
|
|
|
|
}
|
|
|
|
|
2020-08-20 13:34:27 +00:00
|
|
|
directories = {
|
2020-11-10 12:23:22 +00:00
|
|
|
'/home/git': {
|
|
|
|
'mode': '0755',
|
|
|
|
'owner': 'git',
|
|
|
|
'group': 'git',
|
|
|
|
},
|
2020-08-20 13:34:27 +00:00
|
|
|
'/var/lib/gitea': {
|
|
|
|
'owner': 'git',
|
|
|
|
'mode': '0700',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:gitea:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
actions = {
|
|
|
|
'chmod_gitea': {
|
|
|
|
'command': 'chmod a+x /usr/local/bin/gitea',
|
|
|
|
'unless': 'test -x /usr/local/bin/gitea',
|
2020-10-18 14:18:12 +00:00
|
|
|
'needs': {
|
|
|
|
'download:/usr/local/bin/gitea',
|
|
|
|
},
|
2020-08-20 13:34:27 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
|
|
|
'/etc/systemd/system/gitea.service': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': node.metadata['gitea'],
|
|
|
|
'triggers': {
|
|
|
|
'action:systemd-reload',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/gitea/app.ini': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': node.metadata['gitea'],
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:gitea:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
'gitea': {
|
|
|
|
'needs': {
|
|
|
|
'action:chmod_gitea',
|
|
|
|
'download:/usr/local/bin/gitea',
|
|
|
|
'file:/etc/systemd/system/gitea.service',
|
|
|
|
'file:/etc/gitea/app.ini',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|