'Run check mode'

def check(self):

    try:
        if ((self.state == 'absent') and self.exists()):
            changed = True
        elif ((self.state == 'present') and (not self.exists())):
            changed = True
        else:
            changed = False
    except Exception:
        earg = get_exception()
        self.module.fail_json(msg=str(earg))
    self.module.exit_json(changed=changed)
