mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-11-13 23:50:34 +00:00
30 lines
921 B
YAML
30 lines
921 B
YAML
# 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
|
|
|
|
- name: ensure NFS mount dir for Redmine files
|
|
file:
|
|
path: '{{ redmine_files_nfs_mount }}'
|
|
state: directory
|
|
become: yes
|
|
|
|
- name: mount dir for Redmine files
|
|
mount:
|
|
name: '{{ redmine_files_nfs_mount }}'
|
|
src: '{{ redmine_files_nfs_source }}'
|
|
fstype: nfs
|
|
opts: rsize=32768,wsize=32768,tcp,hard,nointr
|
|
state: mounted
|
|
become: 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 }}/uploads'
|
|
notify: restart nginx |