Skip to content

Commit

Permalink
always deploy unit files to avoid file not found error
Browse files Browse the repository at this point in the history
fixes #5
  • Loading branch information
exploide committed May 9, 2022
1 parent a736a7b commit 6a1d1e0
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,23 @@
state: started
enabled: yes

- block:

- name: Install dependencies needed for reboot
package:
name: "{{ dnf_automatic_reboot_dependencies }}"
state: present
tags: pkg

- name: Deploy service and timer units
template:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
owner: root
group: root
mode: 0640
loop:
- dnf-automatic-reboot.service
- dnf-automatic-reboot.timer

- name: Install dependencies needed for reboot
package:
name: "{{ dnf_automatic_reboot_dependencies }}"
state: present
when: dnf_automatic_reboot|bool

- name: Deploy service and timer units
template:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
owner: root
group: root
mode: 0640
loop:
- dnf-automatic-reboot.service
- dnf-automatic-reboot.timer

- name: Set timer state for auto reboot
systemd:
name: dnf-automatic-reboot.timer
Expand Down

0 comments on commit 6a1d1e0

Please sign in to comment.