tools.py 文件源码

python
阅读 44 收藏 0 点赞 0 评论 0

项目:browbeat 作者: openstack 项目源码 文件源码
def gather_metadata(self):
        os.putenv("ANSIBLE_SSH_ARGS", " -F {}".format(self.config['ansible']['ssh_config']))

        ansible_cmd = \
            'ansible-playbook -i {} {}' \
            .format(self.config['ansible']['hosts'], self.config['ansible']['metadata_playbook'])
        self.run_cmd(ansible_cmd)
        if not self.check_metadata():
            self.logger.warning("Metadata could not be gathered")
            return False
        else:
            self.logger.info("Metadata about cloud has been gathered")
            return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号