add fedora-upgrade role, change package update headers to be more descriptive
This commit is contained in:
parent
c775852300
commit
e278978195
5 changed files with 44 additions and 5 deletions
|
@ -1,23 +1,31 @@
|
|||
---
|
||||
- block:
|
||||
|
||||
- name: update packages (atomic)
|
||||
- name: update packages (Fedora Atomic)
|
||||
atomic_host:
|
||||
revision: latest
|
||||
when: ansible_distribution == 'Fedora' and is_atomic
|
||||
register: atomic_host_upgraded
|
||||
|
||||
- name: update packages (non-atomic)
|
||||
- name: refresh and update packages (Fedora)
|
||||
dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
when: ansible_distribution == 'Fedora' and not is_atomic
|
||||
register: fedora_upgraded
|
||||
|
||||
- name: update packages (generic - non-atomic/dnf)
|
||||
package:
|
||||
name: '*'
|
||||
state: latest
|
||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "Fedora", "Debian", "Ubuntu"] and not is_atomic
|
||||
when: ansible_distribution in ["CentOS", "Red Hat Enterprise Linux", "Debian", "Ubuntu"] and not is_atomic
|
||||
register: host_upgraded
|
||||
|
||||
- name: reboot updated hosts
|
||||
shell: nohup bash -c "sleep 2 && shutdown -r now" &
|
||||
register: host_reset
|
||||
when: (atomic_host_upgraded is changed) or (host_upgraded is changed)
|
||||
when: (atomic_host_upgraded is changed) or (host_upgraded is changed) or (fedora_upgraded is changed)
|
||||
|
||||
- name: wait for rebooted host to return
|
||||
wait_for_connection:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue