Fixes %end section on RHEL5 and older

Replaces https://github.com/theforeman/community-templates/pull/83
ternary operator's preferable, like the ones above