gitea: Linting and use .bashrc instead of .profile
This commit is contained in:
parent
baab3192b0
commit
77df67fd66
2 changed files with 14 additions and 9 deletions
|
@ -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"
|
||||||
|
}}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
url: "{{ gitea_url }}"
|
url: "{{ gitea_url }}"
|
||||||
checksum: "sha256:{{ gitea_url }}.sha256"
|
checksum: "sha256:{{ gitea_url }}.sha256"
|
||||||
dest: /usr/local/bin/gitea
|
dest: /usr/local/bin/gitea
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: Restart gitea
|
notify: Restart gitea
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/gitea
|
path: /etc/gitea
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: "0750"
|
||||||
owner: root
|
owner: root
|
||||||
group: gitea
|
group: gitea
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
dest: /etc/gitea/app.ini
|
dest: /etc/gitea/app.ini
|
||||||
src: app.ini.j2
|
src: app.ini.j2
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
owner: root
|
owner: root
|
||||||
group: gitea
|
group: gitea
|
||||||
notify: Restart gitea
|
notify: Restart gitea
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /export/gitea
|
path: /export/gitea
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: "0750"
|
||||||
owner: gitea
|
owner: gitea
|
||||||
group: gitea
|
group: gitea
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/systemd/system/gitea.service
|
dest: /etc/systemd/system/gitea.service
|
||||||
src: gitea.service
|
src: gitea.service
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: Restart gitea
|
notify: Restart gitea
|
||||||
|
@ -87,14 +87,15 @@
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:3000;
|
proxy_pass http://127.0.0.1:3000;
|
||||||
}
|
}
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
||||||
- name: Add gitea alias for root
|
- name: Add gitea alias for root
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: /root/.bash_profile
|
path: /root/.bashrc
|
||||||
block: |
|
block: |
|
||||||
# run gitea as gitea user
|
# 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'
|
||||||
|
|
Loading…
Add table
Reference in a new issue