Test Repo für Ansible Semaphore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
577 B

---
- name: Update and upgrade apt packages
hosts: all
become: yes
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*