gitea: Linting and use .bashrc instead of .profile

This commit is contained in:
Timo Makinen 2023-10-12 18:04:49 +00:00
parent baab3192b0
commit 77df67fd66
2 changed files with 14 additions and 9 deletions

View file

@ -1,2 +1,6 @@
---
gitea_url: "https://dl.gitea.com/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-{{ ansible_system | lower }}-amd64"
gitea_url: >-
{{
"https://dl.gitea.com/gitea/" + gitea_version + "/gitea-" +
gitea_version + "-" + ansible_system | lower + "-amd64"
}}

View file

@ -4,7 +4,7 @@
url: "{{ gitea_url }}"
checksum: "sha256:{{ gitea_url }}.sha256"
dest: /usr/local/bin/gitea
mode: 0755
mode: "0755"
owner: root
group: "{{ ansible_wheel }}"
notify: Restart gitea
@ -28,7 +28,7 @@
ansible.builtin.file:
path: /etc/gitea
state: directory
mode: 0750
mode: "0750"
owner: root
group: gitea
@ -36,7 +36,7 @@
ansible.builtin.template:
dest: /etc/gitea/app.ini
src: app.ini.j2
mode: 0640
mode: "0640"
owner: root
group: gitea
notify: Restart gitea
@ -45,7 +45,7 @@
ansible.builtin.file:
path: /export/gitea
state: directory
mode: 0750
mode: "0750"
owner: gitea
group: gitea
@ -62,7 +62,7 @@
ansible.builtin.copy:
dest: /etc/systemd/system/gitea.service
src: gitea.service
mode: 0644
mode: "0644"
owner: root
group: "{{ ansible_wheel }}"
notify: Restart gitea
@ -87,14 +87,15 @@
location / {
proxy_pass http://127.0.0.1:3000;
}
mode: 0644
mode: "0644"
owner: root
group: "{{ ansible_wheel }}"
notify: Restart nginx
- name: Add gitea alias for root
ansible.builtin.blockinfile:
path: /root/.bash_profile
path: /root/.bashrc
block: |
# run gitea as gitea user
alias gitea='sudo -u gitea HOME=/srv/gitea GITEA_WORK_DIR=/srv/gitea /usr/local/bin/gitea -c /etc/gitea/app.ini'
alias gitea='sudo -u gitea HOME=/srv/gitea GITEA_WORK_DIR=/srv/gitea \
/usr/local/bin/gitea -c /etc/gitea/app.ini'