Skip to content

Commit 57bb0e2

Browse files
committed
fix ansible-lint warning by using a handler for invocation of systemd-tmpfiles
1 parent df5e74a commit 57bb0e2

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

roles/cache/handlers/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
- name: create-systemd-tmpfiles
4+
command:
5+
cmd: systemd-tmpfiles --create

roles/cache/tasks/main.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,5 @@
99
d /var/cache/downloads 1777 root root -
1010
dest: /etc/tmpfiles.d/downloads.conf
1111
mode: 0644
12-
register: download_cache
13-
14-
- name: Trigger systemd to create /var/cache/downloads
15-
command:
16-
cmd: systemd-tmpfiles --create
17-
creates: /var/cache/downloads
18-
when: download_cache.changed
12+
notify:
13+
- create-systemd-tmpfiles

0 commit comments

Comments
 (0)