Add yum module to examples + playbook examples

This commit is contained in:
Michael DeHaan 2012-03-10 11:40:49 -05:00
commit a13def0fbe
8 changed files with 36 additions and 9 deletions

View file

@ -60,10 +60,6 @@ template engine, using 'facter' and 'ohai' prefixes for each.
Managing Packages
`````````````````
Ensure a package is at the latest version::
ansible webservers -m yum -a "pkg=acme state=latest"
Ensure a package is installed, but don't update it::
ansible webservers -m yum -a "pkg=acme state=installed"
@ -72,6 +68,10 @@ Ensure a package is installed to a specific version::
ansible-webservers -m yum -a "pkg=acme-1.5 state=installed"
Ensure a package is at the latest version::
ansible webservers -m yum -a "pkg=acme state=latest"
Ensure a package is not installed:
ansible-webservers -m yum -a "pkg=acme state=removed"

View file

@ -42,6 +42,8 @@ server group, then more commands back on the webservers group, etc::
user: root
tasks:
- include: base.yml somevar=3 othervar=4
- name: ensure apache is installed
action: yum pkg=httpd state=installed
- name: write the apache config file
action: template src=/srv/httpd.j2 dest=/etc/httpd.conf
notify: