fix dnf-automatic role for f26

This commit is contained in:
Kevin Fenzi 2017-03-17 21:21:38 +00:00
parent e85bbb11c5
commit d5e8e3a1d6

View file

@ -10,6 +10,15 @@
dnf: dnf:
name: dnf-automatic name: dnf-automatic
state: present state: present
when: ansible_distribution_major_version|int < 26
tags:
- packages
- name: install dnf-automatic-install
dnf:
name: dnf-automatic-install
state: present
when: ansible_distribution_major_version|int >= 26
tags: tags:
- packages - packages
@ -43,7 +52,7 @@
- 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: args:
creates: /etc/systemd/system/basic.target.wants/dnf-automatic-install.timer creates: /etc/systemd/system/basic.target.wants/dnf-automatic-install.timer
tags: tags:
@ -55,7 +64,7 @@
check_mode: no check_mode: no
changed_when: 1 != 1 changed_when: 1 != 1
ignore_errors: true ignore_errors: true
when: ansible_distribution_major_version|int > 26 when: ansible_distribution_major_version|int >= 26
- name: start dnf-automatic-install.timer if it is not active - name: start dnf-automatic-install.timer if it is not active
command: systemctl start dnf-automatic-install.timer command: systemctl start dnf-automatic-install.timer