Skip to content

Commit

Permalink
Merge pull request #1564 from grycap/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored May 29, 2024
2 parents f362429 + 899bad7 commit d14b4ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IM/ansible_utils/ansible_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AnsibleThread(Process):
"""

def __init__(self, result, output, playbook_file, threads=1, pk_file=None, passwd=None, retries=1,
inventory_file=None, user=None, vault_pass=None, extra_vars=None):
inventory_file=None, user=None, vault_pass=None, extra_vars=None, timeout=20):
super(AnsibleThread, self).__init__()
self.playbook_file = playbook_file
self.passwd = passwd
Expand All @@ -91,6 +91,7 @@ def __init__(self, result, output, playbook_file, threads=1, pk_file=None, passw
self.output = output
self.result = result
self.vault_pass = vault_pass
self.timeout = timeout

def teminate(self):
try:
Expand Down Expand Up @@ -222,6 +223,7 @@ def _gen_options(self):
inventory=self.inventory_file,
private_key_file=self.pk_file,
remote_user=self.user,
timeout=self.timeout,
verbosity=0)

Options = namedtuple('Options',
Expand All @@ -236,6 +238,7 @@ def _gen_options(self):
'inventory',
'private_key_file',
'remote_user',
'timeout',
'verbosity'])
options = Options(connection='ssh',
module_path=None,
Expand All @@ -248,6 +251,7 @@ def _gen_options(self):
inventory=self.inventory_file,
private_key_file=self.pk_file,
remote_user=self.user,
timeout=self.timeout,
verbosity=0)
return options

Expand Down

0 comments on commit d14b4ae

Please sign in to comment.