mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 12:27:37 -02:30
Merge branch 'devel' of https://github.com/ansible/ansible-tower into wf_rbac_prompt
This commit is contained in:
@@ -139,6 +139,9 @@ class JobOptions(BaseModel):
|
||||
become_enabled = models.BooleanField(
|
||||
default=False,
|
||||
)
|
||||
allow_simultaneous = models.BooleanField(
|
||||
default=False,
|
||||
)
|
||||
|
||||
extra_vars_dict = VarsDictProperty('extra_vars', True)
|
||||
|
||||
@@ -237,9 +240,6 @@ class JobTemplate(UnifiedJobTemplate, JobOptions, ResourceMixin):
|
||||
read_role = ImplicitRoleField(
|
||||
parent_role=['project.organization.auditor_role', 'inventory.organization.auditor_role', 'execute_role', 'admin_role'],
|
||||
)
|
||||
allow_simultaneous = models.BooleanField(
|
||||
default=False,
|
||||
)
|
||||
|
||||
|
||||
@classmethod
|
||||
@@ -252,7 +252,7 @@ class JobTemplate(UnifiedJobTemplate, JobOptions, ResourceMixin):
|
||||
'playbook', 'credential', 'cloud_credential', 'network_credential', 'forks', 'schedule',
|
||||
'limit', 'verbosity', 'job_tags', 'extra_vars', 'launch_type',
|
||||
'force_handlers', 'skip_tags', 'start_at_task', 'become_enabled',
|
||||
'labels', 'survey_passwords']
|
||||
'labels', 'survey_passwords', 'allow_simultaneous',]
|
||||
|
||||
def resource_validation_data(self):
|
||||
'''
|
||||
@@ -628,7 +628,7 @@ class Job(UnifiedJob, JobOptions, JobNotificationMixin):
|
||||
if obj.job_template is not None and obj.inventory is not None:
|
||||
if obj.job_template == self.job_template and \
|
||||
obj.inventory == self.inventory:
|
||||
if self.job_template.allow_simultaneous:
|
||||
if self.allow_simultaneous:
|
||||
return False
|
||||
if obj.launch_type == 'callback' and self.launch_type == 'callback' and \
|
||||
obj.limit != self.limit:
|
||||
|
||||
Reference in New Issue
Block a user