Add ES definitions and mappings
Skip apt additions if not Linux
Fix test for apt-based systems.