I just do it with:
group_vars/relevantgroup:
httpd_rpm: httpd # if you aren't fussy - this will get you the latest
at the time of the first run
# or : httpd_rpm: http-2.0.36 # if you want a specific version
task looks like :
- name: install {{ httpd_rpm }}
yum: name={{ httpd_rpm }} state=present
In my experience, state=latest is probably a Bad Idea in the config
management world
- packages changing underneath you either
a) should reload the service (potentially causing an outage) or
b) don't reload the service (almost definitely storing up trouble at
next reboot)
in both cases there's also the risk that a config file default will
change and ruin your day.
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
ansible-proje...@googlegroups.com.
> To post to this group, send email to
ansible...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ansible-project/c8ebc35e-6158-4810-8483-cfd90a125082%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.