Skip to content

Commit

Permalink
Improve for presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Sep 22, 2024
1 parent a2be96d commit 411a97c
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- name: "Restart gitea"
become: true
listen: "systemctl restart gitea"
ansible.builtin.service:
name: gitea
state: restarted
Expand Down
4 changes: 2 additions & 2 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
- name: "Configure gitea"
become: true
ansible.builtin.template:
src: gitea.ini.j2
src: 'templates/gitea.ini.j2'
dest: "{{ gitea_configuration_path }}/gitea.ini"
owner: "{{ gitea_user }}"
group: "{{ gitea_group }}"
mode: '0640'
notify: "Restart gitea"
notify: "systemctl restart gitea"

- name: "Service gitea"
become: true
Expand Down
2 changes: 1 addition & 1 deletion tasks/customize_footer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
mode: '0640'
failed_when: false
tags: skip_ansible_lint
notify: "Restart gitea"
notify: "systemctl restart gitea"
4 changes: 2 additions & 2 deletions tasks/customize_public_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
mode: "u=rwX,g=rX,o="
failed_when: false
tags: skip_ansible_lint
notify: "Restart gitea"
notify: "systemctl restart gitea"

- name: Create css directory for custom themes
when: gitea_custom_themes is defined
Expand All @@ -41,4 +41,4 @@
group: "{{ gitea_group }}"
mode: "u=rwX,g=rX,o="
loop: "{{ gitea_custom_themes }}"
notify: "Restart gitea"
notify: "systemctl restart gitea"
2 changes: 1 addition & 1 deletion tasks/install_forgejo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@
mode: 0755
owner: root
group: root
notify: "Restart gitea"
notify: "systemctl restart gitea"
2 changes: 1 addition & 1 deletion tasks/install_gitea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
mode: 0755
owner: root
group: root
notify: "Restart gitea"
notify: "systemctl restart gitea"
4 changes: 2 additions & 2 deletions tasks/install_systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
- name: "Setup systemd service"
become: true
ansible.builtin.template:
src: gitea.service.j2
src: 'templates/gitea.service.j2'
dest: "{{ gitea_systemd_path }}/gitea.service"
owner: root
group: root
mode: 0644
notify:
- "Reload systemd"
- "Restart gitea"
- "systemctl restart gitea"

- name: "Reload systemd"
become: true
Expand Down
9 changes: 5 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@

- name: Prepare gitea/forgejo variable import
block:
- name: Gather variables for gitea or forgejo
- name: Gather vars for gitea or forgejo
ansible.builtin.include_vars:
file: "{{ lookup('ansible.builtin.first_found', gitea_fork_variables) }}"
file: "{{ lookup('ansible.builtin.first_found',
gitea_fork_variables) }}"
rescue:
- name: Gitea/Forejo import info
- name: Gitea/Forgejo import info
ansible.builtin.fail:
msg: "Currently only {{ gitea_supported_forks }} are supported."
msg: "Only {{ gitea_supported_forks }} are supported."

- name: Gather Gitea/Forgejo UI Theme variables
ansible.builtin.include_vars:
Expand Down
4 changes: 3 additions & 1 deletion tasks/set_forgejo_version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- name: "Check forgejo installed version"
ansible.builtin.shell: "set -eo pipefail; {{ gitea_full_executable_path }} -v | cut -d' ' -f 3"
ansible.builtin.shell: |
set -eo pipefail
{{ gitea_full_executable_path }} -v | cut -d' ' -f 3
args:
executable: '/bin/bash'
register: gitea_active_version
Expand Down
4 changes: 3 additions & 1 deletion tasks/set_gitea_version.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- name: "Check gitea installed version"
ansible.builtin.shell: "set -eo pipefail; {{ gitea_full_executable_path }} -v | cut -d' ' -f 3"
ansible.builtin.shell: |
set -eo pipefail
{{ gitea_full_executable_path }} -v | cut -d' ' -f 3
args:
executable: /bin/bash
register: gitea_active_version
Expand Down

0 comments on commit 411a97c

Please sign in to comment.