yum

Collection: builtin

Full Name: parallax.builtin.yum

Aliases: ansible.builtin.yum, yum

Synopsis

Manage yum

Parameters

NameTypeRequiredDefaultDescription
namelistA package name or package specifier with version, like name-1.0
statestringpresentWhether to install (present/installed), remove (absent/removed), or update (latest)
enablerepolistRepoid of repositories to enable for the install/update operation
disablerepolistRepoid of repositories to disable for the install/update operation
liststringPackage name to run the equivalent of yum list –show-duplicates against
conf_filestringThe remote yum configuration file to use for the transaction
disable_gpg_checkboolfalseWhether to disable the GPG checking of signatures of packages being installed
skip_brokenboolfalseSkip packages with broken dependencies(devsolve) and are causing problems
update_cacheboolfalseForce yum to check if cache is out of date and redownload if needed
validate_certsbooltrueThis only applies if using a https url as the source of the rpm
sslverifybooltrueDisables SSL validation of the repository server for this transaction
update_onlyboolfalseWhen using latest, only update installed packages
securityboolfalseIf set to true, and state=latest, only install security updates
bugfixboolfalseIf set to true, and state=latest, only install bugfix updates
enable_pluginlistPlugin name to enable for the install/update operation
disable_pluginlistPlugin name to disable for the install/update operation
releaseverstringSpecifies an alternative release from which all packages will be installed
autoremoveboolfalseIf true, removes orphaned dependency packages no longer required by installed packages
excludelistPackage name(s) to exclude when state=present, or latest
download_onlyboolfalseOnly download the packages, do not install them
download_dirstringSpecifies an alternate directory to store packages
install_repoquerybooltrueThis is effectively a no-op in YUM as it is not needed with YUM
installrootstring/Specifies an alternative installroot, relative to which all packages will be installed
allow_downgradeboolfalseSpecify if the named package and version is allowed to downgrade a maybe already installed higher version of that package
install_weak_depsbooltrueWill also install all packages linked by a weak dependency relation
lock_timeoutint30Amount of time to wait for the yum lockfile to be freed
use_backendstringautoBackend to use Choices: auto, yum, yum4, dnf
cacheonlyboolfalseTells yum to run entirely from system cache; does not download or update metadata

Example

- name: Example yum task
  yum:
    name: <your_name>
    state: present