community / community.general / 1.3.14 / module / apt_rpm apt_rpm package manager Authors: Evgenii Terechkov (@evgkrsk)community.general.apt_rpm (1.3.14) — module
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
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). type: bool