yum
Collection: builtin
Full Name: parallax.builtin.yum
Aliases: ansible.builtin.yum, yum
Synopsis
Manage yum
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | list | A package name or package specifier with version, like name-1.0 | ||
| state | string | present | Whether to install (present/installed), remove (absent/removed), or update (latest) | |
| enablerepo | list | Repoid of repositories to enable for the install/update operation | ||
| disablerepo | list | Repoid of repositories to disable for the install/update operation | ||
| list | string | Package name to run the equivalent of yum list –show-duplicates | ||
| conf_file | string | The remote yum configuration file to use for the transaction | ||
| disable_gpg_check | bool | false | Whether to disable the GPG checking of signatures of packages being installed | |
| skip_broken | bool | false | Skip packages with broken dependencies(devsolve) and are causing problems | |
| update_cache | bool | false | Force yum to check if cache is out of date and redownload if needed | |
| validate_certs | bool | true | This only applies if using a https url as the source of the rpm | |
| sslverify | bool | true | Disables SSL validation of the repository server for this transaction | |
| update_only | bool | false | When using latest, only update installed packages | |
| security | bool | false | If set to true, and state=latest, only install security updates | |
| bugfix | bool | false | If set to true, and state=latest, only install bugfix updates | |
| enable_plugin | list | Plugin name to enable for the install/update operation | ||
| disable_plugin | list | Plugin name to disable for the install/update operation | ||
| releasever | string | Specifies an alternative release from which all packages will be installed | ||
| autoremove | bool | false | If true, removes orphaned dependency packages no longer required by installed packages | |
| exclude | list | Package name(s) to exclude when state=present, or latest | ||
| download_only | bool | false | Only download the packages, do not install them | |
| download_dir | string | Specifies an alternate directory to store packages | ||
| install_repoquery | bool | true | This is effectively a no-op in YUM as it is not needed with YUM | |
| installroot | string | / | Specifies an alternative installroot, relative to which all packages will be installed | |
| allow_downgrade | bool | false | Specify if the named package and version is allowed to downgrade a maybe already installed higher version of that package | |
| install_weak_deps | bool | true | Will also install all packages linked by a weak dependency relation | |
| lock_timeout | int | 30 | Amount of time to wait for the yum lockfile to be freed | |
| use_backend | string | auto | Backend to use Choices: auto, yum, yum4, dnf | |
| cacheonly | bool | false | Tells yum to run entirely from system cache; does not download or update metadata |
Example
- name: Example yum task
yum:
name: <your_name>
state: present