linter applied to file
This commit is contained in:
10
update.yml
10
update.yml
@@ -1,24 +1,24 @@
|
||||
---
|
||||
- name: Update system packages
|
||||
hosts: gitrunner
|
||||
become: yes
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Update system packages
|
||||
yum:
|
||||
ansible.builtin.dnf:
|
||||
name: "*"
|
||||
state: latest
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Check if reboot required (RedHat/CentOS)
|
||||
command: needs-restarting -r
|
||||
ansible.builtin.command: needs-restarting -r
|
||||
register: needs_restarting_output
|
||||
changed_when: false
|
||||
ignore_errors: true
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Reboot if required (RedHat/CentOS)
|
||||
reboot:
|
||||
ansible.builtin.reboot:
|
||||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
- needs_restarting_output.rc == 1
|
||||
|
||||
Reference in New Issue
Block a user