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:
|
2019-12-14 22:36:51 +00:00
|
|
|
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
|
2019-02-20 08:17:59 +00:00
|
|
|
|
|
|
|
- name: Install avahi
|
|
|
|
apt:
|
2019-12-14 22:36:51 +00:00
|
|
|
name: "avahi-daemon"
|
|
|
|
state: present
|
2019-02-20 08:17:59 +00:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
|
|
|
|
- name: Setup timemachine service for avahi
|
|
|
|
template:
|
2019-12-14 22:36:51 +00:00
|
|
|
src: timemachine/timemachine.service
|
|
|
|
dest: "/etc/avahi/services/timemachine.service"
|
2019-02-20 08:17:59 +00:00
|
|
|
|
|
|
|
- name: Reload avahi configuration
|
|
|
|
service:
|
2019-12-14 22:36:51 +00:00
|
|
|
name: avahi-daemon
|
|
|
|
state: reloaded
|