I'm writing a role to configure syslog, and of course the service is 
different between Linux instances. How do I do this in var/main.yml?

# pseudo-code in vars/main.yml
if Redhat7.x
  syslog_service: rsyslog
else if RedHat6.x
  syslog_service: syslog
end


So then I can just do this in tasks/main.yml

- name: Ensure syslog is running
  service: name="{{ syslog_service }}" state=running enabled=yes


Thanks!

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1f595730-130a-4e82-ab9b-f881b4e729cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to