Is it possible to use multiple if statements in a salt state?
You can have more than if statement per state. The issue is that your conditional doesn't seem actually be checking the hostname, it's just passing everything. Try this:

{% if grains['host'] in ['dev-server2', 'test-server2'] %}