This commit is contained in:
Kevin Fenzi 2017-03-17 21:34:52 +00:00
parent 7005cbf688
commit 41f43d4b8f

View file

@ -10,15 +10,6 @@
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
@ -52,7 +43,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:
@ -64,10 +55,10 @@
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
when: automaticative|failed and ansible_distribution_major_version|int > 26 when: automaticative|failed and ansible_distribution_major_version|int => 26
when: ansible_pkg_mgr == 'dnf' when: ansible_pkg_mgr == 'dnf'