Intial Commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
|
||||
tasks:
|
||||
- name: "Updating and Upgrading Apt Packages"
|
||||
apt:
|
||||
update_cache: yes
|
||||
upgrade: safe
|
||||
when: ansible_os_family == "Debian"
|
||||
become: true
|
||||
|
||||
- name: "Updating and Upgrading Yum Packages"
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
when: ansible_os_family == "RedHat"
|
||||
become: true
|
||||
|
||||
# For DNF-based systems (e.g., Fedora), you can add a similar task:
|
||||
- name: "Updating and Upgrading Dnf Packages"
|
||||
dnf:
|
||||
name: '*'
|
||||
state: latest
|
||||
when: ansible_distribution == "Fedora"
|
||||
become: true
|
||||
|
||||
# For Windows Hosts
|
||||
- name: Install all updates and reboot as many times as needed
|
||||
ansible.windows.win_updates:
|
||||
category_names: '*'
|
||||
reboot: true
|
||||
when: ansible_os_family == "Windows"
|
||||
|
||||
- name: Upgrade installed packages
|
||||
win_chocolatey:
|
||||
name: all
|
||||
state: latest
|
||||
when: ansible_os_family == "Windows"
|
||||
# Specific adjustments for Raspbian can be made here, if necessary
|
||||
# Raspbian will typically be covered by the Debian task, but if you have specific needs, you can specify them here.
|
||||
Reference in New Issue
Block a user