1
0
Fork 0
forked from infra/ansible
infra-ansible/playbooks/universe_update.yml
Ryan Lerch 691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00

66 lines
1.4 KiB
YAML

#
# This playboook updates every host in inventory
#
---
- name: Set downtime
hosts: all
gather_facts: false
user: root
serial: 1
tasks:
- name: Silence nagios completely
nagios: action=silence
delegate_to: noc01.iad2.fedoraproject.org
ignore_errors: true
failed_when: no
when: nonagios is not defined or not "true" in nonagios
- name: Update the world
hosts: all
gather_facts: true
user: root
tasks:
- name: Apply updates
package:
state: latest
name: "*"
update_cache: true
async: 7200
poll: 30
when: package_excludes is not defined
- debug:
msg:
- '!!!!!!!!!!!!!!!!!!! host {{ inventory_hostname }} has EXCLUDES OF {{ package_excludes }} !!!!!!!!!!!!!'
- '!!!!!!!!!!!!!!!!!!! DANGER DANGER DANGER ^ CHECK THAT EXCLUDES ARE STILL NEEDED ^ !!!!!!!!!!!!!!!!!!!!'
when: package_excludes is defined
changed_when: true
- name: Apply updates with excludes
package:
state: latest
name: "*"
update_cache: true
exclude: "{{ package_excludes }}"
async: 7200
poll: 30
when: package_excludes is defined
- name: Run rkhunter if installed
hosts: all
user: root
tasks:
- name: Check for rkhunter
command: /usr/bin/test -f /usr/bin/rkhunter
register: rkhunter
ignore_errors: true
- name: Run rkhunter --propupd
command: /usr/bin/rkhunter --propupd
when: rkhunter is success