Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.apt_rpm
.
Parameter | Choices/Defaults | Comments |
---|---|---|
package list / elements=string / required | list of packages to install, upgrade or remove. aliases: name, pkg | |
state string |
| Indicates the desired package state. |
update_cache boolean |
| update the package database first apt-get update .aliases: update-cache |
- 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
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/apt_rpm_module.html