Skip to content

Commit

Permalink
nginx: manage ffmuc.net rsync setup in Salt
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett committed Jan 6, 2025
1 parent 8921eb9 commit 7099e55
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion nginx/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###
{%- set role = salt['pillar.get']('netbox:role:name', salt['pillar.get']('netbox:device_role:name')) %}
{% set tags = salt['pillar.get']('netbox:tag_list', []) %}
{% if "webserver" in role or "webserver" in tags %}
{% if not "jitsi meet" in role and ("webserver" in role or "webserver" in tags) %}

nginx-repo-key:
cmd.run:
Expand Down Expand Up @@ -125,6 +125,37 @@ nginx-module-{{ module }}:
- require_in:
- service: nginx

{% if "ffmuc.net" in salt['pillar.get']('netbox:config_context:webserver:domains') %}
/srv/www/ffmuc.net:
file.directory:
- user: deploy-ffmuc
- group: deploy-ffmuc

/srv/www/ffmuc.net/.ssh:
file.directory:
- user: deploy-ffmuc
- group: deploy-ffmuc

/srv/www/ffmuc.net/.ssh/id_ed25519:
file.managed:
- contents_pillar: netbox:config_context:ffmuc-net_deploy:ssh_privkey
- user: deploy-ffmuc
- group: deploy-ffmuc

/srv/www/ffmuc.net/.ssh/id_ed25519.pub:
file.managed:
- contents_pillar: netbox:config_context:ffmuc-net_deploy:ssh_pubkey
- user: deploy-ffmuc
- group: deploy-ffmuc

/srv/www/ffmuc.net/.ssh/authorized_keys:
file.managed:
- contents_pillar: netbox:config_context:ffmuc-net_deploy:ssh_pubkey
- user: deploy-ffmuc
- group: deploy-ffmuc

{% endif %}{# "ffmuc.net" in salt['pillar.get']('netbox:config_context:webserver:domains') #}

/etc/logrotate.d/nginx:
file.managed:
- source: salt://nginx/files/logrotate.conf
Expand Down

0 comments on commit 7099e55

Please sign in to comment.