Page MenuHomeDevCentral

D2154.id5437.diff
No OneTemporary

D2154.id5437.diff

diff --git a/roles/devserver/webserver-wwwroot51/init.sls b/roles/devserver/webserver-wwwroot51/init.sls
--- a/roles/devserver/webserver-wwwroot51/init.sls
+++ b/roles/devserver/webserver-wwwroot51/init.sls
@@ -24,13 +24,30 @@
{{ basedir }}/{{ sitename }}:
file.directory:
- dir_mode: 711
+{% if 'repository' not in site %}
- user: {{ site['user'] }}
- group: {{ site['group'] }}
-{% if 'repository' in site %}
+{% else %}
+ # Credentials belong to deploy user
+ - user: deploy
+
git.latest:
- name: {{ site['repository'] }}
- target: {{ basedir }}/{{ sitename }}
- - user: {{ site['user'] }}
+ - user: deploy
+ - identity: /opt/salt/security/id_ed25519
- update_head: False
+
+fix_rights_{{ basedir }}/{{ sitename }}:
+ file.directory:
+ - name: {{ basedir }}/{{ sitename }}
+ - user: {{ site['user'] }}
+ - group: {{ site['group'] }}
+ - recurse:
+ - user
+ - group
+ - onchanges:
+ - git: {{ basedir }}/{{ sitename }}
+
{% endif %}
{% endfor %}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 20:52 (20 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263006
Default Alt Text
D2154.id5437.diff (1 KB)

Event Timeline