ansible-nas/tasks/timemachine.yml
2019-10-19 14:23:56 -07:00

39 lines
979 B
YAML

---
- 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"
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