本文整理汇总了Python中ansible.constants.RETRY_FILES_ENABLED属性的典型用法代码示例。如果您正苦于以下问题:Python constants.RETRY_FILES_ENABLED属性的具体用法?Python constants.RETRY_FILES_ENABLED怎么用?Python constants.RETRY_FILES_ENABLED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类ansible.constants
的用法示例。
在下文中一共展示了constants.RETRY_FILES_ENABLED属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from ansible import constants [as 别名]
# 或者: from ansible.constants import RETRY_FILES_ENABLED [as 别名]
def __init__(self, playbook_path, inventory=None, options=None):
"""
:param options: Ansible options like ansible.cfg
:param inventory: Ansible inventory
:param BaseInventory:The BaseInventory parameter hostname must be equal to the hosts in yaml
or the BaseInventory parameter groups must equal to the hosts in yaml.
"""
if options:
self.options = options
C.RETRY_FILES_ENABLED = False
self.inventory = inventory
# self.loader = self.loader_class()
self.loader = DataLoader()
self.results_callback = self.results_callback_class()
# self.playbook_path = options.playbook_path
self.playbook_path = playbook_path
self.variable_manager = self.variable_manager_class(
loader=self.loader, inventory=self.inventory
)
# self.passwords = options.passwords
self.passwords = {"passwords": ''} # 为了修改paramiko中的bug添加入,无实际意义
self.__check()
示例2: __init__
# 需要导入模块: from ansible import constants [as 别名]
# 或者: from ansible.constants import RETRY_FILES_ENABLED [as 别名]
def __init__(self, playbook_path, inventory=None, options=None):
"""
:param options: Ansible options like ansible.cfg
:param inventory: Ansible inventory
:param BaseInventory:The BaseInventory parameter hostname must be equal to the hosts in yaml
or the BaseInventory parameter groups must equal to the hosts in yaml.
"""
if options:
self.options = options
C.RETRY_FILES_ENABLED = False
self.inventory = inventory
# self.loader = self.loader_class()
self.loader = DataLoader()
self.results_callback = self.results_callback_class()
# self.playbook_path = options.playbook_path
self.playbook_path = playbook_path
self.variable_manager = self.variable_manager_class(
loader=self.loader, inventory=self.inventory
)
# self.passwords = options.passwords
self.passwords = {"passwords":''}#为了修改paramiko中的bug添加入,无实际意义
self.__check()
示例3: __init__
# 需要导入模块: from ansible import constants [as 别名]
# 或者: from ansible.constants import RETRY_FILES_ENABLED [as 别名]
def __init__(self, inventory, options=None, stdout=None):
"""
:param options: Ansible full_options like ansible.cfg
:param inventory: Ansible inventory_obj
"""
super().__init__(inventory, options=options)
C.RETRY_FILES_ENABLED = False