1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2025-09-09 14:09:29 +00:00

add tasks to use NFS for file attachment storage on production server

This commit is contained in:
Mark Heiges
2015-12-04 16:54:18 -05:00
parent 0fe9d61644
commit 8cb5d6da66
4 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
# Tasks to do only on the production server.
# Setup NFS mounts where file attachments will be stored.
# This is so files are backed up on the NFS host; when hosting
# redmine on a VM without a backup client.
#
# Be sure the UID for the redmine user matches with the
# NFS server
- file: path='{{ redmine_files_nfs_mount }}'
state=directory
sudo: yes
- mount: name='{{ redmine_files_nfs_mount }}'
src='{{ redmine_files_nfs_source }}'
fstype=nfs
opts=rsize=32768,wsize=32768,tcp,hard,nointr
state=mounted
sudo: yes
- name: set attachments_storage_path in configuration.yml
lineinfile: >
dest='{{ redmine_root_dir }}/config/configuration.yml'
regexp='\s*attachments_storage_path:'
line=' attachments_storage_path: {{ redmine_files_nfs_mount }}'
notify: restart nginx

View File

@@ -1,13 +1,15 @@
---
- include: system.yml
- include: system.yml tags=system
- include: firewall.yml
- include: firewall.yml tags=firewall
- include: database.yml
- include: database.yml tags=database
when: do_database_management == True
- include: redmine.yml
- include: redmine.yml tags=redmine
- include: nginx.yml
- include: nginx.yml tags=nginx
- include: attachments_storage.yml tags=attachments_storage
when: is_production_vm == True