Fix timemachine and its tests

This commit is contained in:
Anarion 2023-03-10 22:36:46 +01:00
parent ea98920018
commit 5409640a12
No known key found for this signature in database
GPG key ID: 6C9E149718A7D4EB
3 changed files with 18 additions and 5 deletions

View file

@ -0,0 +1,6 @@
---
- name: Reload Avahi Configuration
ansible.builtin.service:
name: avahi-daemon
state: reloaded
listen: "reload avahi configuration"

View file

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

View file

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