Fix handler of forgejo restart running when service doesn't exist yet
This commit is contained in:
parent
15dff1571a
commit
776fd31d8b
2 changed files with 13 additions and 13 deletions
|
@ -22,17 +22,6 @@
|
|||
changed_when: false
|
||||
failed_when: '"Good signature from" not in result.stderr'
|
||||
|
||||
- name: Copy binary to global location
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: "{{ forgejo_run_dir }}/forgejo-{{ forgejo_latest_version }}-linux-{{ forgejo_architecture }}"
|
||||
dest: /usr/local/bin/forgejo
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
notify: Restart forgejo service
|
||||
|
||||
- name: Start forgejo service
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
|
|
|
@ -32,7 +32,18 @@
|
|||
- Receive forgejo pgp key
|
||||
- Download forgejo asc file
|
||||
- Verify forgejo binary with gpg
|
||||
- Copy binary to global location
|
||||
|
||||
- name: Make sure downloaded binary has been verified and copied to global location
|
||||
- name: Make sure downloaded binary has been verified
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Copy binary to global location
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: "{{ forgejo_run_dir }}/forgejo-{{ forgejo_latest_version }}-linux-{{ forgejo_architecture }}"
|
||||
dest: /usr/local/bin/forgejo
|
||||
remote_src: true
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
when: forgejo_installed_version.stdout is version(forgejo_latest_version, '<')
|
||||
notify: Restart forgejo service
|
||||
|
|
Loading…
Add table
Reference in a new issue