From 0061ec4a09a4b9db515674fb7b4fddbea37882b6 Mon Sep 17 00:00:00 2001 From: Jonathan Lozada D Date: Fri, 8 Jun 2018 06:11:01 -0400 Subject: [PATCH] Changes to Yum Documentation (#41054) * added an example for a list of packages to install and added C() to some areas since it cannot be read right * fixed the changes to list for --- lib/ansible/modules/packaging/os/yum.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index c5a6173b1e2..cb2b1d595cf 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -28,7 +28,7 @@ options: - A package name or package specifier with version, like C(name-1.0). - If a previous version is specified, the task also needs to turn C(allow_downgrade) on. See the C(allow_downgrade) documentation for caveats with downgrading packages. - - When using state=latest, this can be '*' which means run C(yum -y update). + - When using state=latest, this can be C('*') which means run C(yum -y update). - You can also pass a url or a local path to a rpm file (using state=present). To operate on several packages this can accept a comma separated list of packages or (as of 2.0) a list of packages. aliases: [ pkg ] @@ -52,13 +52,13 @@ options: description: - I(Repoid) of repositories to enable for the install/update operation. These repos will not persist beyond the transaction. - When specifying multiple repos, separate them with a ",". + When specifying multiple repos, separate them with a C(","). version_added: "0.9" disablerepo: description: - I(Repoid) of repositories to disable for the install/update operation. These repos will not persist beyond the transaction. - When specifying multiple repos, separate them with a ",". + When specifying multiple repos, separate them with a C(","). version_added: "0.9" conf_file: description: @@ -73,8 +73,7 @@ options: version_added: "1.2" skip_broken: description: - - Resolve depsolve problems by removing packages that are causing problems from the transā€ - action. + - Skip packages with broken dependencies(devsolve) and are causing problems. type: bool default: "no" version_added: "2.3" @@ -253,6 +252,14 @@ EXAMPLES = ''' yum: name: sos disablerepo: "epel,ol7_latest" + +- name: Install a list of packages + yum: + name: + - nginx + - postgresql + - postgresql-server + state: present ''' import os