1234567891011121314151617181920212223242526272829 |
- ---
- - name: Make Gogs init script executable.
- file:
- path: "{{ gogs_user_home }}/{{ gogs_init_script_path }}"
- mode: 0755
- - name: Set path to Gogs in init script.
- lineinfile:
- dest: "{{ gogs_user_home }}/{{ gogs_init_script_path }}"
- line: "WORKINGDIR={{ gogs_user_home }}/gogs"
- 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 }}"
- dest: "{{ item.dest }}"
- state: link
- with_items:
- - { src: "{{ gogs_user_home }}/gogs/gogs", dest: "/usr/local/bin/gogs" }
- - { src: "{{ gogs_user_home }}/{{ gogs_init_script_path }}" , dest: "/etc/init.d/gogs" }
- notify: restart gogs
|