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