Browse Source

set user in init script

Fabian Peter Hammerle 7 years ago
parent
commit
f39e24c3f5
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tasks/init-setup.yml

+ 7 - 0
tasks/init-setup.yml

@@ -11,6 +11,13 @@
     regexp: "^WORKINGDIR=.*"
   notify: restart gogs
 
+- name: Set user in Gogs init script.
+  lineinfile:
+    dest: "{{ gogs_user_home }}/{{ gogs_init_script_path }}"
+    line: "USER={{ gogs_user }}"
+    regexp: "^USER=.*"
+  notify: restart gogs
+
 - name: Symlink Gogs binary and startup scripts.
   file:
     src: "{{ item.src }}"