community / community.general / 3.8.10 / module / apt_rpm apt_rpm package manager Authors: Evgenii Terechkov (@evgkrsk)community.general.apt_rpm (3.8.10) — module
Install with ansible-galaxy collection install community.general:==3.8.10
collections: - name: community.general version: 3.8.10
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 community.general.apt_rpm: pkg: foo state: present
- name: Install packages foo and bar community.general.apt_rpm: pkg: - foo - bar state: present
- name: Remove package foo community.general.apt_rpm: pkg: foo state: absent
- name: Remove packages foo and bar community.general.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 community.general.apt_rpm: name: bar state: present update_cache: yes
state: choices: - absent - present - installed - removed default: present description: - Indicates the desired package state. type: str package: aliases: - name - pkg description: - list of packages to install, upgrade or remove. elements: str required: true type: list update_cache: aliases: - update-cache default: false description: - update the package database first C(apt-get update). - Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0. type: bool