Rework logic to handle f22 systemd
This commit is contained in:
parent
dc6f14bd31
commit
1fed3a1d2c
1 changed files with 13 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: install dnf-automatic
|
- name: install dnf-automatic
|
||||||
yum: name=dnf-automatic state=present
|
dnf: name=dnf-automatic state=present
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
when: ansible_distribution == 'Fedora'
|
when: ansible_distribution == 'Fedora'
|
||||||
|
@ -19,7 +19,18 @@
|
||||||
when: ansible_distribution == 'Fedora'
|
when: ansible_distribution == 'Fedora'
|
||||||
|
|
||||||
- name: enable and start dnf-automatic
|
- name: enable and start dnf-automatic
|
||||||
command: systemctl enable dnf-automatic.timer --now creates=/etc/systemd/system/basic.target.wants/dnf-automatic.timer
|
command: systemctl enable dnf-automatic.timer creates=/etc/systemd/system/basic.target.wants/dnf-automatic.timer
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
when: ansible_distribution == 'Fedora'
|
when: ansible_distribution == 'Fedora'
|
||||||
|
|
||||||
|
- name: check if dnf-automatic.timer is active
|
||||||
|
command: systemctl is-active dnf-automatic.timer
|
||||||
|
result: automaticative
|
||||||
|
always_run: yes
|
||||||
|
changed_when: 1 != 1
|
||||||
|
when: ansible_distribution == 'Fedora'
|
||||||
|
|
||||||
|
- name: start dnf-automatic.timer if it is not active
|
||||||
|
command: systemctl start dnf-automatic.timer
|
||||||
|
when: automaticactive|failed and ansible_distribution == 'Fedora'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue