add update-linux.yml
This commit is contained in:
parent
e390440dfc
commit
15d8ebcf95
27
update/update-linux.yml
Normal file
27
update/update-linux.yml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Update and upgrade apt packages
|
||||
hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: Update packages with apt
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Update packages with yum
|
||||
when: ansible_pkg_mgr == 'yum'
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
|
||||
- name: Upgrade packages with apt
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
apt:
|
||||
upgrade: dist
|
||||
|
||||
- name: Upgrade packages with yum
|
||||
when: ansible_pkg_mgr == 'yum'
|
||||
yum:
|
||||
name: '*'
|
||||
state: latest
|
||||
exclude: kernel*
|
||||
Loading…
Reference in New Issue
Block a user