summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Doran <sdoran@ansible.com>2016-10-12 18:07:26 -0400
committerSam Doran <sdoran@ansible.com>2016-11-15 14:55:33 -0500
commit7363fd198bd73ad5b7ed6a7fd6ca03b33bb6ef83 (patch)
tree572c55c9aca07b6933af0681de48edbb3b88d3ff
parent68c78cf40dfe19bccf89fdc6c3896ef1d84edb93 (diff)
downloadansible-modules-core-7363fd198bd73ad5b7ed6a7fd6ca03b33bb6ef83.tar.gz
Change example syntax on yum module
-rw-r--r--packaging/os/yum.py37
1 files changed, 28 insertions, 9 deletions
diff --git a/packaging/os/yum.py b/packaging/os/yum.py
index 7356880f..13cc4d61 100644
--- a/packaging/os/yum.py
+++ b/packaging/os/yum.py
@@ -156,31 +156,50 @@ author:
EXAMPLES = '''
- name: install the latest version of Apache
- yum: name=httpd state=latest
+ yum:
+ name: httpd
+ state: latest
- name: remove the Apache package
- yum: name=httpd state=absent
+ yum:
+ name: httpd
+ state: absent
- name: install the latest version of Apache from the testing repo
- yum: name=httpd enablerepo=testing state=present
+ yum:
+ name: httpd
+ enablerepo: testing
+ state: present
- name: install one specific version of Apache
- yum: name=httpd-2.2.29-1.4.amzn1 state=present
+ yum:
+ name: httpd-2.2.29-1.4.amzn1
+ state: present
- name: upgrade all packages
- yum: name=* state=latest
+ yum:
+ name: '*'
+ state: latest
- name: install the nginx rpm from a remote repo
- yum: name=http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm state=present
+ yum:
+ name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm'
+ state: present
- name: install nginx rpm from a local file
- yum: name=/usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm state=present
+ yum:
+ name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm
+ state: present
- name: install the 'Development tools' package group
- yum: name="@Development tools" state=present
+ yum:
+ name: "@Development tools"
+ state: present
- name: install the 'Gnome desktop' environment group
- yum: name="@^gnome-desktop-environment" state=present
+ yum:
+ name: "@^gnome-desktop-environment"
+ state: present
'''
# 64k. Number of bytes to read at a time when manually downloading pkgs via a url