ansible-nas/tasks/timemachine.yml

42 lines
1,000 B
YAML
Raw Normal View History

2018-12-28 01:00:51 +00:00
---
- name: Time Machine Directories
file:
path: "{{ timemachine_data_directory }}"
state: directory
- 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"
ulimits:
- "nofile:1048576:1048576"
network_mode: bridge
restart_policy: unless-stopped
memory: 1g
- name: Install avahi
apt:
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"
- name: Reload avahi configuration
service:
name: avahi-daemon
state: reloaded