1234567891011121314151617181920 |
- ---
- - name: Make Gogs init script executable.
- file:
- path: "{{ gogs_user_home }}/{{ gogs_init_script_path }}"
- mode: 0755
- - name: Symlink Gogs binary and startup scripts.
- file:
- src: "{{ item.src }}"
- dest: "{{ item.dest }}"
- state: link
- register: gogs_file_symlinks
- 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" }
- # 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
|