Commit Graph

79 Commits

Author SHA1 Message Date
Yunfan Zhang
0de369b42f Fix job id incorrectly cast to string in ActiveJobConflict. 2018-06-08 09:31:38 -04:00
Ryan Petrello
d8f86ecba0 add help text for the new custom_virtualenv field
see: https://github.com/ansible/tower/issues/1866
2018-05-23 16:19:59 -04:00
AlanCoding
69eccd3130 move ACTIVE_STATES to constants 2018-03-16 10:31:41 -04:00
AlanCoding
7881c921ac block deletion of resources w unprocessed events 2018-03-16 10:14:28 -04:00
chris meyers
5d5d8152c5 prevent instance group delete if running jobs
* related to https://github.com/ansible/ansible-tower/issues/7936
2018-03-15 14:25:49 -04:00
Ryan Petrello
8955e6bc1c normalize custom_virtualenv empty values to null
see: https://github.com/ansible/ansible-tower/issues/7923
2018-03-05 17:05:10 -05:00
cclauss
552b69592c six.string_types in mixins.py 2018-02-14 08:35:14 +01:00
cclauss
c371b869dc basestring to six.string_types for Python 3 2018-02-09 16:28:36 +01:00
adamscmRH
0c63ea0052 extends JT xtra var error msg 2018-01-15 15:05:03 -05:00
Ryan Petrello
1e8c89f536 implement support for per-playbook/project/org virtualenvs
see: https://github.com/ansible/awx/issues/34
2018-01-09 22:47:01 -05:00
AlanCoding
3439ba5f3b allow WFJT nodes without required variables 2017-12-18 12:03:40 -05:00
AlanCoding
c8e10adc96 fix bug saving extra_data and follow prompts rules
display_extra_vars was not taking a copy of the data before
acting on it - this causes a bug where the activity stream will
modify the existing object on the model. That leads to new data
not being accepted.

Also moved the processing of extra_data to prior to the accept
or ignore kwargs logic so that we pass the right (post-encryption)
form of the variables.
2017-12-18 10:50:22 -05:00
AlanCoding
1e1839915d validate against unencrypted values at spawn point 2017-12-15 10:47:23 -05:00
Matthew Jones
9dbcc5934e Merge remote-tracking branch 'tower/release_3.2.2' into devel 2017-12-13 12:25:47 -05:00
AlanCoding
659d31324d hide survey passwords in saved launch configs 2017-12-12 09:35:46 -05:00
AlanCoding
1c8217936d Bug fixes from integration ran on launchtime branch
Make error message for muti-vault validation more
consistent with historical message
2017-12-08 13:46:38 -05:00
AlanCoding
34a8e0a9b6 Feature: saved launchtime configurations
Consolidate prompts accept/reject logic in unified models
Break out accept/reject logic for variables
Surface new promptable fields on WFJT nodes, schedules

Make schedules and workflows accurately reject variables
  that are not allowed by the prompting
  rules or the survey rules on the template

Validate against unallowed extra_data in system job schedules
Prevent schedule or WFJT node POST/PATCH with unprompted data
Move system job days validation to new mechanism
Add new psuedo-field for WFJT node credential
Add validation for node related credentials
Add related config model to unified job
Use JobLaunchConfig model for launch RBAC check

Support credential overwrite behavior with multi-creds
  change modern manual launch to use merge behavior
Refactor JobLaunchSerializer, self.instance=None
Modularize job launch view to create "modern" data
Auto-create config object with every job
Add create schedule endpoint for jobs
2017-12-08 13:38:54 -05:00
Ryan Petrello
112757e202 properly handle JT launch POST for required survey fields w/ no default
see: ansible/ansible-tower#7805
2017-12-04 09:45:21 -05:00
Ryan Petrello
12380fe1b1 add more tests for survey default encryption
see: https://github.com/ansible/ansible-tower/issues/7805
see: https://github.com/ansible/ansible-tower/issues/7806
see: https://github.com/ansible/ansible-tower/issues/7807
2017-12-04 09:45:14 -05:00
Ryan Petrello
6c7851b51f fix another survey encryption-related bug 2017-12-01 17:11:00 -05:00
AlanCoding
47f45bf9b3 block user from entering encrypted as bare default 2017-12-01 14:44:06 -05:00
Ryan Petrello
1425021106 fix another encrypted survey password bug
properly encrypt extra_vars that overlap with survey passwords when
`ask_variables_on_launch=true`

see: https://github.com/ansible/ansible-tower/issues/7796
2017-11-28 16:52:47 -05:00
Ryan Petrello
044c047ac6 fix a bug in survey password default validation
see: https://github.com/ansible/ansible-tower/issues/7046
see: https://github.com/ansible/ansible-tower/issues/7764
see: https://github.com/ansible/ansible-tower/issues/7784
2017-11-27 17:25:45 -05:00
Chris Meyers
9288b53015 cascade cancel proj update when job canceled
* Implicit project update, launch_type='sync', get "associated" with a
job via project_update. When a job is canceled, so should this implicit
project update. This change enforces that logic.
2017-11-15 11:17:52 -05:00
Ryan Petrello
be00b1ca96 render survey_spec for display purposes in a safe manner
survey_spec is a nested dict, so if we don't `deepcopy()` it, updates
to the individual fields could corrupt the original data structure;
this was causing a bug whereby activity stream updates converted
encrypted survey password defaults -> `$encrypted$`, but inadvertently
modified the originating model due to shared references

see: https://github.com/ansible/ansible-tower/issues/7769
2017-11-13 13:01:56 -05:00
Ryan Petrello
78961c8037 properly perform validation on encrypted survey defaults
see: https://github.com/ansible/ansible-tower/issues/7764
2017-11-10 10:52:09 -05:00
Ryan Petrello
82d05e0a10 properly sanitize encrypted default passwords in JT.survey_spec
see: https://github.com/ansible/ansible-tower/issues/7259
2017-10-10 14:38:47 -04:00
Ryan Petrello
4be4e3db7f encrypt job survey data
see: https://github.com/ansible/ansible-tower/issues/7046
2017-10-10 14:38:46 -04:00
Chris Meyers
1d0e125aad make password survey field behave like text field
related to https://github.com/ansible/ansible-tower/issues/6083
2017-07-27 12:57:31 -04:00
Aaron Tan
047ad7ca4a Enforce extra_vars override hierachy 2017-07-26 18:10:33 -04:00
Chris Meyers
525490a9a0 all dependent jobs must finish before starting job
related to https://github.com/ansible/ansible-tower/issues/6570 https://github.com/ansible/ansible-tower/issues/6489

* Ensure that all jobs dependent on a job have finished (i.e. error,
success, failed) before starting the dependent job.
* Fixes a bug where a smaller set of dependent jobs to fail upon a
update_on_launch job failing is chosen.
* This fixes the bug of jobs starting before dependent Project Updates
created via update on launch. This also fixes similar bugs associated
with inventory updates.
2017-07-24 12:31:35 -04:00
Michael Abashian
58cc33481e Merge pull request #6000 from mabashian/5926-survey-password-minlength
Fixed min/max length survey password bug
2017-04-18 14:09:08 -04:00
Michael Abashian
c3d002cc0f Fixed min/max length survey password bug where password had default and min > 12 2017-04-11 15:13:13 -04:00
AlanCoding
b9c45ed54a Fix bug where API assumed survey choices were list
Applies to both single-select and multi-select type questions.
UI sends choices in the form of text with line breaks
separating the options.
Customer complained about empty string erronously sent by
the UI being passed to playbook, which is a component of this.
2017-04-07 09:03:45 -04:00
Wayne Witzel III
18eaacf4bb create _survey_element_validation and use it for updating extra_vars 2017-03-24 17:57:52 -04:00
Wayne Witzel III
c99d4659da Do not set the default if the field was not passed in to kwargs_extra_vars 2017-03-24 16:59:43 -04:00
Ryan Petrello
d24fb32358 blacklist certain sensitive fields and relations as search arguments
see: #5465
see: #5478
2017-02-21 16:18:02 -05:00
Wayne Witzel III
ec86961e13 only assign the default if it is not None 2017-02-02 14:48:31 -05:00
Wayne Witzel III
755e408cd9 fix fields with no defaults showing in extra_vars display when not provided 2017-01-30 13:29:55 -05:00
Wayne Witzel III
5ace8dad4e fix KeyError for default, added tests 2017-01-30 12:15:43 -05:00
Alan Rominger
6d590ca985 Merge pull request #4974 from AlanCoding/job_event_need_for_speed
job_event speedups, async filter removed, RBAC changes
2017-01-27 11:23:25 -05:00
Wayne Witzel III
7807ee09f9 Merge pull request #4915 from wwitzel3/issue-4636
Mask the default value for password fields in survey_spec.
2017-01-27 02:37:16 -05:00
AlanCoding
18aa0dcb1f remove job_event text filters, tweaked RBAC
see issue 4958 for the RBAC details
2017-01-26 19:22:03 -05:00
AlanCoding
36c68178dd cleanup from accessible_objects refactor 2017-01-25 09:51:24 -05:00
AlanCoding
b2d0871a5e Refactor of accessible_objects for polymorphic model
query simplification, with break-out into an intermediary
state that can be used in access methods
2017-01-25 09:51:24 -05:00
Wayne Witzel III
fba1fa83d0 reduce, reuse, recycle 2017-01-24 16:44:42 -05:00
Wayne Witzel III
735f5d14b3 ensure that launching respects default values 2017-01-24 16:39:41 -05:00
Wayne Witzel III
cf6c4fe7ac mask the default value for survey_spec password fields 2017-01-24 13:03:57 -05:00
AlanCoding
8cd4ba0175 refactor of create_unified_job in connection with new copy endpoint development 2016-11-22 11:35:41 -05:00
AlanCoding
4a992e531a copy organization when copying a WFJT 2016-11-22 11:35:40 -05:00