mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-26 02:05:05 +00:00
Fix timemachine and its tests
This commit is contained in:
parent
ea98920018
commit
5409640a12
3 changed files with 18 additions and 5 deletions
6
roles/timemachine/handlers/main.yml
Normal file
6
roles/timemachine/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Reload Avahi Configuration
|
||||
ansible.builtin.service:
|
||||
name: avahi-daemon
|
||||
state: reloaded
|
||||
listen: "reload avahi configuration"
|
|
@ -4,3 +4,13 @@ provisioner:
|
|||
group_vars:
|
||||
all:
|
||||
timemachine_enabled: true
|
||||
platforms:
|
||||
- name: instance
|
||||
image: geerlingguy/docker-ubuntu2204-ansible:latest
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
cgroupns_mode: host
|
||||
command: "/usr/sbin/init"
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
ansible.builtin.apt:
|
||||
name: "avahi-daemon"
|
||||
state: present
|
||||
update_cache: yes
|
||||
register: result
|
||||
until: result is succeeded
|
||||
|
||||
|
@ -37,11 +38,7 @@
|
|||
ansible.builtin.template:
|
||||
src: timemachine.service
|
||||
dest: "/etc/avahi/services/timemachine.service"
|
||||
|
||||
- name: Reload avahi configuration
|
||||
ansible.builtin.service:
|
||||
name: avahi-daemon
|
||||
state: reloaded
|
||||
notify: reload avahi configuration
|
||||
when: timemachine_enabled is true
|
||||
|
||||
- name: Stop Time Machine
|
||||
|
|
Loading…
Reference in a new issue