dnf-automatic: Change the way enabling dnf-automatic detects changes.

For some reason on some hosts it creates the wants in basic target and in others multi-user target,
so the creates won't work on all machines. Instead we just run it all the time and check the output
to see if it did something or not.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2018-12-30 18:35:31 +00:00
parent 8830d2ad1a
commit 82c3fba9b8

View file

@ -44,8 +44,8 @@
- name: enable and start dnf-automatic f26+ - name: enable and start dnf-automatic f26+
command: systemctl enable dnf-automatic-install.timer command: systemctl enable dnf-automatic-install.timer
when: ansible_distribution_major_version|int >= 26 when: ansible_distribution_major_version|int >= 26
args: register: dnf-automatic-enable
creates: /etc/systemd/system/multi-user.target.wants/dnf-automatic-install.timer changed_when: "'Created symlink ' in dnf-automatic-enable.stdout"
tags: tags:
- config - config