W3cubDocs

/Ansible 2.11

community.general.urpmi – Urpmi manager

Note

This plugin is part of the community.general collection (version 2.0.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.urpmi.

Synopsis

  • Manages packages with urpmi (such as for Mageia or Mandriva)

Parameters

Parameter Choices/Defaults Comments
force
boolean
    Choices:
  • no
  • yes
Assume "yes" is the answer to any question urpmi has to ask. Corresponds to the --force option for urpmi.
name
list / elements=string / required
A list of package names to install, upgrade or remove.

aliases: package, pkg
no_recommends
boolean
    Choices:
  • no
  • yes
Corresponds to the --no-recommends option for urpmi.

aliases: no-recommends
root
string
Specifies an alternative install root, relative to which all packages will be installed. Corresponds to the --root option for urpmi.

aliases: installroot
state
string
    Choices:
  • absent
  • present
  • installed
  • removed
Indicates the desired package state.
update_cache
boolean
    Choices:
  • no
  • yes
Update the package database first urpmi.update -a.

aliases: update-cache

Examples

- name: Install package foo
  community.general.urpmi:
    pkg: foo
    state: present

- name: Remove package foo
  community.general.urpmi:
    pkg: foo
    state: absent

- name: Remove packages foo and bar
  community.general.urpmi:
    pkg: foo,bar
    state: absent

- name: Update the package database (urpmi.update -a -q) and install bar (bar will be the updated if a newer version exists)
- community.general.urpmi:
    name: bar
    state: present
    update_cache: yes

Authors

  • Philippe Makowski (@pmakowski)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/urpmi_module.html