run dnf-automatic only for recent Fedoras
copr-keygen is still on F21 and it fails there
This commit is contained in:
parent
0a200b27e0
commit
15dabba643
1 changed files with 5 additions and 5 deletions
|
@ -10,19 +10,19 @@
|
||||||
dnf: name=dnf-automatic state=present
|
dnf: name=dnf-automatic state=present
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- packages
|
||||||
when: ansible_distribution == 'Fedora'
|
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int > 21
|
||||||
|
|
||||||
- name: install /etc/dnf/automatic.conf
|
- name: install /etc/dnf/automatic.conf
|
||||||
template: src=automatic.conf.j2 dest=/etc/dnf/automatic.conf mode=0644
|
template: src=automatic.conf.j2 dest=/etc/dnf/automatic.conf mode=0644
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
when: ansible_distribution == 'Fedora'
|
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int > 21
|
||||||
|
|
||||||
- name: enable and start dnf-automatic
|
- name: enable and start dnf-automatic
|
||||||
command: systemctl enable dnf-automatic.timer 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' and ansible_distribution_major_version|int > 21
|
||||||
|
|
||||||
- name: check if dnf-automatic.timer is active
|
- name: check if dnf-automatic.timer is active
|
||||||
command: systemctl is-active dnf-automatic.timer
|
command: systemctl is-active dnf-automatic.timer
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
always_run: yes
|
always_run: yes
|
||||||
changed_when: 1 != 1
|
changed_when: 1 != 1
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: ansible_distribution == 'Fedora'
|
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int > 21
|
||||||
|
|
||||||
- name: start dnf-automatic.timer if it is not active
|
- name: start dnf-automatic.timer if it is not active
|
||||||
command: systemctl start dnf-automatic.timer
|
command: systemctl start dnf-automatic.timer
|
||||||
when: automaticative|failed and ansible_distribution == 'Fedora'
|
when: automaticative|failed and ansible_distribution == 'Fedora' and ansible_distribution_major_version|int > 21
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue