In playbooks, hosts can be a YAML list. We templated the list before converting it to a semicolon-separated string, which actually templated its repr. This converts to a string first. A basic unit test is included.