community / community.general / 0.2.1 / module / apt_rpm apt_rpm package manager Authors: Evgenii Terechkov (@evgkrsk)community.general.apt_rpm (0.2.1) — module
Install with ansible-galaxy collection install community.general:==0.2.1
collections: - name: community.general version: 0.2.1
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: Install packages foo and bar apt_rpm: pkg: - foo - bar 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
state: choices: - absent - present default: present description: - Indicates the desired package state. package: aliases: - name - pkg description: - list of packages to install, upgrade or remove. elements: str required: true type: list update_cache: default: 'no' description: - update the package database first C(apt-get update). type: bool