use instance metadata to resolve instance role
fix IF condition
Merge pull request #3 from alexism/bug/issue02

use instance metadata to resolve instance role