ansible / ansible.builtin / v2.9.27 / module / apt_rpm apt_rpm package manager | "added in version" 1.5 of ansible.builtin" Authors: Evgenii Terechkov (@evgkrsk) preview | supported by communityansible.builtin.apt_rpm (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Manages packages with I(apt-rpm). Both low-level (I(rpm)) and high-level (I(apt-get)) package manager binaries required.
- name: Install package foo apt_rpm: pkg: foo state: present
- name: Remove package foo apt_rpm: pkg: foo state: absent
- name: Remove packages foo and bar apt_rpm: pkg: foo,bar state: absent
# bar will be the updated if a newer version exists - name: Update the package database and install bar apt_rpm: name: bar state: present update_cache: yes
pkg: description: - name of package to install, upgrade or remove. required: true state: choices: - absent - present default: present description: - Indicates the desired package state. update_cache: default: 'no' description: - update the package database first C(apt-get update). type: bool