add nofile ulimits to time machine docker container

This commit is contained in:
David Stephens 2019-12-14 22:36:51 +00:00
parent 2082d5b3ea
commit 26977cc523

View file

@ -6,34 +6,36 @@
- name: Time Machine Docker Container
docker_container:
name: timemachine
image: awlnx/samba-timemachine:latest
pull: true
ports:
- "{{ timemachine_port }}:445"
env:
TMSIZE: "{{ timemachine_volume_size_limit }}"
PASS: "{{ timemachine_password }}"
SHARENAME: "{{ timemachine_share_name }}"
volumes:
- "{{ timemachine_data_directory }}/data:/backups"
network_mode: bridge
restart_policy: unless-stopped
memory: 1g
name: timemachine
image: awlnx/samba-timemachine:latest
pull: true
ports:
- "{{ timemachine_port }}:445"
env:
TMSIZE: "{{ timemachine_volume_size_limit }}"
PASS: "{{ timemachine_password }}"
SHARENAME: "{{ timemachine_share_name }}"
volumes:
- "{{ timemachine_data_directory }}/data:/backups"
ulimits:
- "nofile:1048576:1048576"
network_mode: bridge
restart_policy: unless-stopped
memory: 1g
- name: Install avahi
apt:
name: "avahi-daemon"
state: present
name: "avahi-daemon"
state: present
register: result
until: result is succeeded
- name: Setup timemachine service for avahi
template:
src: timemachine/timemachine.service
dest: "/etc/avahi/services/timemachine.service"
src: timemachine/timemachine.service
dest: "/etc/avahi/services/timemachine.service"
- name: Reload avahi configuration
service:
name: avahi-daemon
state: reloaded
name: avahi-daemon
state: reloaded