initial playbooks - updates on Linux servers

This commit is contained in:
2021-01-27 00:16:34 -06:00
commit 5ac6618960
6 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
---
- name: Update Alpine Linux Systems
hosts: alpine
become: yes
tasks:
- name: Update apk
command: /sbin/apk update
tasks:
- name: Upgrade apk
command: /sbin/apk upgrade -U -a

View File

@@ -0,0 +1,10 @@
---
- name: Update CentOS Linux Systems
hosts: centos
become: yes
tasks:
- name: Run yum update
yum:
name: "*"
state: latest

View File

@@ -0,0 +1,11 @@
---
- name: Update Debian Linux Systems
hosts: debian
become: yes
tasks:
- name: Update apt repo and cache
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
- name: Upgrade all packages
apt: upgrade=dist force_apt_get=yes

View File

@@ -0,0 +1,10 @@
---
- name: Update RedHat Enterprise Linux Systems
hosts: rhel
become: yes
tasks:
- name: Run dnf update
dnf:
name: "*"
state: latest

View File

@@ -0,0 +1,11 @@
---
- name: Update Ubuntu Linux Systems
hosts: ubuntu
become: yes
tasks:
- name: Update apt repo and cache
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
- name: Upgrade all packages
apt: upgrade=dist force_apt_get=yes

6
update.yaml Normal file
View File

@@ -0,0 +1,6 @@
---
- import_playbook: update-playbooks/ubuntu-update.yaml
- import_playbook: update-playbooks/centos-update.yaml
- import_playbook: update-playbooks/alpine-update.yaml
- import_playbook: update-playbooks/debian-update.yaml
- import_playbook: update-playbooks/rhel-update.yaml