adding a bare bones inv check, testing only, blatantly ripped off from ansible upstream