@@ -0,0 +1,1467 @@
+#!/usr/bin/env python3%0Afrom __future__ import print_function%0Aimport sys%0Afrom pprint import pprint%0Aimport yaml%0Afrom typing import Dict, Tuple, Set%0A%0A%0Adef cmp_two_dicts(data1: Dict, data2: Dict) -%3E Tuple%5BSet, Set, Set%5D:%0A    # from https://stackoverflow.com/questions/3697432/how-to-find-list-intersection/33067553%0A    keys_data1 = set(data1.keys())%0A    keys_data2 = set(data2.keys())%0A%0A    keys_both  = set(%5Bx for x in keys_data1 if x     in keys_data2%5D)%0A    keys_only1 = set(%5Bx for x in keys_data1 if x not in keys_data2%5D)%0A    keys_only2 = set(%5Bx for x in keys_data2 if x not in keys_data1%5D)%0A%0A    return (keys_both, keys_only1, keys_only2)%0A%0A%0Adef cmp_two_files(file1: str, file2: str) -%3E None:%0A%0A    print(%22Checking %7B%7D%3C-%3E%7B%7D... %22.format(file1, file2), end='')%0A%0A    try:%0A        with open(file1, encoding='utf-8') as f:%0A            data1 = yaml.safe_load(f.read())%0A        with open(file2, encoding='utf-8') as f:%0A            data2 = yaml.safe_load(f.read())%0A    except Exception as e:%0A        print(%22failed: %7B%7D%22.format(e))%0A        sys.exit(1)%0A    else:%0A        print(%22found%22)%0A%0A    (both, only1, only2) = cmp_two_dicts(data1, data2)%0A    for x in data1:%0A        if x in only1:%0A            print(f%22Key %7Bx%7D is only in %7Bfile1%7D%22)%0A        elif x in only2:%0A            print(f%22Key %7Bx%7D is only in %7Bfile2%7D%22)%0A        else:%0A            print(f%22Key %7Bx%7D is ok%22)%0A%0A    return%0A%0A%0Acmp_two_files(%22environments/surf/group_vars/test.yml%22, %22environments/surf/group_vars/pilot.yml%22)%0A%0A%0Asys.exit(0)%0A

add script to compare test and pilot group_vars