|
@@ -9,6 +9,12 @@
|
|
src: "{{ item.src }}"
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
dest: "{{ item.dest }}"
|
|
state: link
|
|
state: link
|
|
|
|
+ register: gogs_file_symlinks
|
|
with_items:
|
|
with_items:
|
|
- { src: "{{ gogs_user_home }}/gogs/gogs", dest: "/usr/local/bin/gogs" }
|
|
- { src: "{{ gogs_user_home }}/gogs/gogs", dest: "/usr/local/bin/gogs" }
|
|
- { src: "{{ gogs_user_home }}/{{ gogs_init_script_path }}" , dest: "/etc/init.d/gogs" }
|
|
- { src: "{{ gogs_user_home }}/{{ gogs_init_script_path }}" , dest: "/etc/init.d/gogs" }
|
|
|
|
+
|
|
|
|
+# SEE: https://github.com/ansible/ansible-modules-core/issues/191
|
|
|
|
+- name: Restart systemctl daemon on systemd systems.
|
|
|
|
+ shell: systemctl daemon-reload
|
|
|
|
+ when: gogs_file_symlinks.changed and ansible_os_family == "RedHat" and ansible_lsb.major_release|int == 7
|