because of course dnf-automatic changes in f26, why keep a stable interface
This commit is contained in:
parent
fdaeadf755
commit
def29b08c7
1 changed files with 24 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
- name: enable and start dnf-automatic
|
||||
command: systemctl enable dnf-automatic.timer
|
||||
when: ansible_distribution_major_version|int < 26
|
||||
args:
|
||||
creates: /etc/systemd/system/basic.target.wants/dnf-automatic.timer
|
||||
tags:
|
||||
|
@ -34,8 +35,30 @@
|
|||
check_mode: no
|
||||
changed_when: 1 != 1
|
||||
ignore_errors: true
|
||||
when: ansible_distribution_major_version|int < 26
|
||||
|
||||
- name: start dnf-automatic.timer if it is not active
|
||||
command: systemctl start dnf-automatic.timer
|
||||
when: automaticative|failed
|
||||
when: automaticative|failed and ansible_distribution_major_version|int < 26
|
||||
|
||||
- name: enable and start dnf-automatic f26+
|
||||
command: systemctl enable dnf-automatic-install.timer
|
||||
when: ansible_distribution_major_version|int < 26
|
||||
args:
|
||||
creates: /etc/systemd/system/basic.target.wants/dnf-automatic-install.timer
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: check if dnf-automatic-install.timer is active
|
||||
command: systemctl is-active dnf-automatic-install.timer
|
||||
register: automaticative
|
||||
check_mode: no
|
||||
changed_when: 1 != 1
|
||||
ignore_errors: true
|
||||
when: ansible_distribution_major_version|int < 26
|
||||
|
||||
- name: start dnf-automatic-install.timer if it is not active
|
||||
command: systemctl start dnf-automatic-install.timer
|
||||
when: automaticative|failed and ansible_distribution_major_version|int < 26
|
||||
|
||||
when: ansible_pkg_mgr == 'dnf'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue