This commit is contained in:
tanshu committed 2022-08-02 06:40:29 +05:30
1 parent a2e773b3ab
commit 5713d3d410
16 files changed
+179 -274

No files matched your search

+6 -10
View File
@@ -14,17 +14,9 @@
comment: Git user
create_home: yes
- name: Ensure SSH Passthrough file Directory exists
file:
path: /app/gitea
state: directory
group: git
owner: git
mode: 0755
- name: Check if ssh passthrough file exists
stat:
path: /app/gitea/gitea
path: /usr/local/bin/gitea
register: pass_status
- name: No need to upload ssh passthrough file
@@ -36,7 +28,7 @@
when: pass_status.stat.exists == false
template:
src: "files/gitea"
dest: "/app/gitea/gitea"
dest: "/usr/local/bin/gitea"
owner: "{{ user }}"
group: "{{ user }}"
mode: 0755
@@ -80,6 +72,7 @@
- name: Add key to authorized_files
when: key_status.stat.exists == false
copy:
remote_src: yes
src: /home/git/.ssh/id_rsa.pub
dest: /home/git/.ssh/authorized_keys
owner: git
@@ -104,6 +97,9 @@
image: "{{ container_image }}"
state: started
restart_policy: "unless-stopped"
cpus: .10
memory: "512M"
memory_swap: "512M"
env:
USER_UID: "{{ getent_passwd[user][1] }}"
USER_GID: "{{ getent_passwd[user][2] }}"