initial playbooks - updates on Linux servers
This commit is contained in:
12
update-playbooks/alpine-update.yaml
Normal file
12
update-playbooks/alpine-update.yaml
Normal 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
|
10
update-playbooks/centos-update.yaml
Normal file
10
update-playbooks/centos-update.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Update CentOS Linux Systems
|
||||
hosts: centos
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- name: Run yum update
|
||||
yum:
|
||||
name: "*"
|
||||
state: latest
|
11
update-playbooks/debian-update.yaml
Normal file
11
update-playbooks/debian-update.yaml
Normal 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
|
10
update-playbooks/rhel-update.yaml
Normal file
10
update-playbooks/rhel-update.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Update RedHat Enterprise Linux Systems
|
||||
hosts: rhel
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- name: Run dnf update
|
||||
dnf:
|
||||
name: "*"
|
||||
state: latest
|
11
update-playbooks/ubuntu-update.yaml
Normal file
11
update-playbooks/ubuntu-update.yaml
Normal 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
6
update.yaml
Normal 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
|
Reference in New Issue
Block a user