Add EFS support to Gitea
This commit is contained in:
parent
11bb70b522
commit
04b8738435
@ -91,6 +91,29 @@
|
||||
owner: git
|
||||
group: git
|
||||
path: "{{ gitea_root_directory }}"
|
||||
- name: Set up EFS mount
|
||||
block:
|
||||
- name: Install required packages
|
||||
apt:
|
||||
name:
|
||||
- nfs-client
|
||||
- name: Create EFS
|
||||
efs:
|
||||
name: "{{ gitea.efs.name }}"
|
||||
encrypt: yes
|
||||
region: "{{ gitea.efs.region }}"
|
||||
targets:
|
||||
- subnet_id: "{{ gitea.efs.subnet_id }}"
|
||||
security_groups: [ "{{ gitea.efs.security_group }}" ]
|
||||
register: efs
|
||||
- name: Mount EFS
|
||||
path: "{{ gitea_root_directory }}"
|
||||
src: "{{ efs.efs.filesystem_address }}"
|
||||
fstype: nfs4
|
||||
opts: "nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport"
|
||||
state: mounted
|
||||
when: gitea.efs.name is defined
|
||||
tags: [ giteaefs ]
|
||||
- name: Check for config
|
||||
stat: path="/etc/gitea/app.ini"
|
||||
register: p
|
||||
|
Loading…
Reference in New Issue
Block a user