Supports apt, dnf, yum, pacman, apk and zypper. Variables cover install, remove, upgrade, cache refresh and autoremove.
10 lines
343 B
YAML
10 lines
343 B
YAML
---
|
|
- name: Assert supported package manager
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_pkg_mgr in ['apt', 'dnf', 'yum', 'pacman', 'apk', 'zypper']
|
|
fail_msg: "Package manager '{{ ansible_pkg_mgr }}' is not supported by this role"
|
|
|
|
- name: Include package manager tasks
|
|
ansible.builtin.include_tasks: "{{ ansible_pkg_mgr }}.yml"
|