bundles/nginx: prepare for arch linux
This commit is contained in:
parent
6b90d568cf
commit
cf3c45fdd5
4 changed files with 35 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
if node.has_bundle('pacman'):
|
||||
package = 'pkg_pacman:nginx'
|
||||
username = 'http'
|
||||
else:
|
||||
package = 'pkg_apt:nginx'
|
||||
username = 'www-data'
|
||||
|
||||
directories = {
|
||||
'/etc/nginx/sites': {
|
||||
'purge': True,
|
||||
|
@ -17,7 +24,10 @@ directories = {
|
|||
files = {
|
||||
'/etc/nginx/nginx.conf': {
|
||||
'content_type': 'mako',
|
||||
'context': node.metadata['nginx'],
|
||||
'context': {
|
||||
'username': username,
|
||||
**node.metadata['nginx'],
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:nginx:restart',
|
||||
},
|
||||
|
@ -42,6 +52,14 @@ files = {
|
|||
'mode': '0755',
|
||||
},
|
||||
}
|
||||
if node.has_bundle('pacman'):
|
||||
files['/etc/systemd/system/nginx.service.d/bundlewrap.conf'] = {
|
||||
'source': 'arch-override.conf',
|
||||
'triggers': {
|
||||
'action:systemd-reload',
|
||||
'svc_systemd:nginx:restart',
|
||||
},
|
||||
}
|
||||
|
||||
actions = {
|
||||
'nginx-generate-dhparam': {
|
||||
|
@ -54,7 +72,7 @@ svc_systemd = {
|
|||
'nginx': {
|
||||
'needs': {
|
||||
'action:nginx-generate-dhparam',
|
||||
'pkg_apt:nginx',
|
||||
package,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue