def mkconf(self):  # pylint: disable=W0221
        data = {}
        if self.opts['config_dir']:
            spath = os.path.join(self.opts['config_dir'], 'master')
            with open(spath) as conf:
                data = yaml.load(conf)
        data.update({
            'log_file': os.path.join(self.conf, 'master.log'),
            'open_mode': True  # TODO Pre-seed keys
        })

        os.makedirs(self.conf)
        path = os.path.join(self.conf, 'master')

        with open(path, 'w+') as fp_:
            yaml.dump(data, fp_)
Make a master config and write it'
dataset/ETHPy150Open saltstack/salt/tests/minionswarm.py/MasterSwarm.mkconf