[Bugfix] 修复无法记录日志的bug

pull/828/merge
ibuler 7 years ago
parent 76df1de634
commit e1b23a7cb4

@ -62,6 +62,7 @@ class BaseHost(Host):
self.set_variable("ansible_become_pass", become.get('pass', ''))
else:
self.set_variable("ansible_become", False)
print(self.get_vars())
def __set_extra_variables(self):
for k, v in self.host_data.get('vars', {}).items():

@ -58,7 +58,6 @@ def get_inventory(hostname_list, run_as_admin=False, run_as=None, become_info=No
)
@record_adhoc
def get_adhoc_runner(hostname_list, run_as_admin=False, run_as=None, become_info=None):
inventory = get_inventory(
hostname_list, run_as_admin=run_as_admin,
@ -68,6 +67,7 @@ def get_adhoc_runner(hostname_list, run_as_admin=False, run_as=None, become_info
return runner
@record_adhoc
def run_adhoc_object(adhoc, **options):
"""
:param adhoc: Instance of AdHoc

@ -19,7 +19,6 @@ from .forms import AssetPermissionForm
class AssetPermissionListView(AdminUserRequiredMixin, ListView):
model = AssetPermission
paginate_by = settings.CONFIG.DISPLAY_PER_PAGE
context_object_name = 'asset_permission_list'
template_name = 'perms/asset_permission_list.html'

@ -86,10 +86,10 @@
<td>{% trans 'Role' %}:</td>
<td><b>{{ user_object.get_role_display }}</b></td>
</tr>
<tr>
<td>{% trans 'Enable OTP' %}:</td>
<td><b>{{ user_object.enable_otp|yesno:"Yes,No,Unknown"}}</b></td>
</tr>
{# <tr>#}
{# <td>{% trans 'Enable OTP' %}:</td>#}
{# <td><b>{{ user_object.enable_otp|yesno:"Yes,No,Unknown"}}</b></td>#}
{# </tr>#}
<tr>
<td>{% trans 'Date expired' %}:</td>
<td><b>{{ user_object.date_expired|date:"Y-m-j H:i:s" }}</b></td>

Loading…
Cancel
Save