'run command'

def run(self):

    has_errors = False
    for yaml_file in find_files(os.path.join(os.getcwd(), 'playbooks', 'byo'), None, None, '\\.ya?ml$'):
        with open(yaml_file, 'r') as contents:
            for line in contents:
                if re.search('initialize_groups\\.yml', line):
                    print(('-' * 60))
                    print(('Syntax    checking    playbook:    %s' % yaml_file))
                    try:
                        subprocess.check_output(['ansible-playbook', '-i    localhost,', '--syntax-check', yaml_file])
                    except subprocess.CalledProcessError as cpe:
                        print('{}Execution    failed:    {}{}'.format(self.FAIL, cpe, self.ENDC))
                        has_errors = True
                    break
    if has_errors:
        raise SystemExit(1)
