Commit Graph

722 Commits

Author SHA1 Message Date
Ryan Petrello
6b6b4de205 Merge pull request #13 from ryanpetrello/fix-7252
allow Job Templates to launch with *only* a vault credential
2017-07-24 16:36:44 -04:00
Ryan Petrello
94efdec092 Merge pull request #12 from ryanpetrello/fix-6776
don't allow boolean credential type fields that specify `secret`
2017-07-24 16:17:56 -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
Ryan Petrello
b0f5d2f82d allow Job Templates to launch with *only* a vault credential
see: https://github.com/ansible/ansible-tower/issues/7252
2017-07-24 11:42:35 -04:00
Ryan Petrello
9f11c008d2 don't allow boolean credential type fields that specify secret
secret doesn't really make sense for boolean values; they can't store
sensitive content because they're just true|false

see: https://github.com/ansible/ansible-tower/issues/6776
2017-07-24 11:41:12 -04:00
Ryan Petrello
340ced02e2 Merge pull request #7240 from ryanpetrello/fix-7216
improve sanitation of empty credential values to match API v1 behavior
2017-07-21 12:45:16 -04:00
Bill Nottingham
836dc7d7f5 Fixup unit tests 2017-07-21 11:45:02 -04:00
Ryan Petrello
a640d6afec improve sanitation of empty credential values to match API v1 behavior
This is mostly backwards compatability to avoid surprises: in 3.1.x
if you submit a field value with `null` or an empty string to
a CharField, it's treated as an empty string (and SSH key validation
is skipped).  For boolean field values (`net.authorize`), `null` and
empty string are coerced to `False`.

see: #7216
see: #7218
2017-07-21 11:25:56 -04:00
Alan Rominger
4c7e7c281c Merge pull request #7188 from AlanCoding/just_update_already
Allow manual updates in spite of update_on_project_update
2017-07-20 10:13:15 -04:00
AlanCoding
f2d51f99dc Allow manual updates in spite of update_on_project_update
This makes inventory sources with the that flag set behave
like any other inventory source with manual use.
They will still update when triggered by a project SCM
hash change.
2017-07-20 09:38:47 -04:00
Alan Rominger
c038116626 Merge pull request #7095 from AlanCoding/schedule_validation
Add various validation for schedule extra_data
2017-07-20 09:30:29 -04:00
Chris Meyers
91e67b9a74 Merge pull request #7159 from chrismeyersfsu/fix-5645
do not accept array as extra_vars
2017-07-20 09:16:22 -04:00
Chris Meyers
802f722e95 do not accept array as extra_vars
related to #5645

* Since we pass extra_vars to ansible as -e; we require that the top
most data-structure be a key-value. NOT an array.
2017-07-19 17:07:50 -04:00
Ryan Petrello
4b168f5f1c Merge pull request #7122 from ryanpetrello/fix-7099
properly validate `choices` for credential type schemas
2017-07-19 16:02:27 -04:00
Ryan Petrello
b98d384671 filter CredentialType OPTIONS *and* help text for kind requirements
see: #7115
see: #6959
2017-07-18 17:51:07 -04:00
Ryan Petrello
afb307c146 properly validate choices for credential input validation
see: #7119
2017-07-17 16:58:33 -04:00
Ryan Petrello
0b6c43dac0 allow access to insights credentials in /api/v1/
see: #6978
2017-07-17 10:14:29 -04:00
AlanCoding
ed7e558575 add various validation for schedule extra_data 2017-07-15 20:47:24 -04:00
Matthew Jones
8e8324983b Merge branch 'license_module_switch' into devel
* license_module_switch:
  Hide eula if stub license is used
  Fix up some issues on feature validation for licenses
  Remove any references to internal licensing utilities
  Switch out existing obfuscated license with external module
2017-07-13 11:08:47 -04:00
Matthew Jones
c1ce79d0a5 Fix up some issues on feature validation for licenses
Also purging and fixing up some unit test behavior
2017-07-13 10:27:43 -04:00
AlanCoding
0a6329feff deleted related in activity stream tests/surfacing
This adds a test to replicate the scenario reported about
bugs in activity stream entry generation in cascade delete
chains. Also puts a new string in the entry that uses the
deleted objects's primary key.
2017-07-13 09:07:53 -04:00
Matthew Jones
96a9d048b8 Remove any references to internal licensing utilities 2017-07-12 16:20:35 -04:00
AlanCoding
2c81a2489e prohibit direct creation of manual inventory sources 2017-07-12 12:29:56 -04:00
Alan Rominger
4afb65f447 Merge pull request #6909 from AlanCoding/no_manual_source_proj
Disallow manual projects for SCM inventory
2017-07-12 12:08:19 -04:00
Ryan Petrello
28f44c3ab0 filter Insights credentials from /api/v1/credentials/
see: #6978
see: #6088
2017-07-11 13:55:43 -04:00
Ryan Petrello
bc869284f7 Merge pull request #6968 from ryanpetrello/fix-6959
fix a few issues in credential type kind validation
2017-07-11 13:30:07 -04:00
Alan Rominger
6d251babb5 Merge pull request #6947 from AlanCoding/circular
Move circular group association validation to view
2017-07-11 12:45:29 -04:00
Matthew Jones
8486944eaa Switch out existing obfuscated license with external module
This creates a new fallback license module called StubLicense that
will be used in the event that the tower_license module is not
installed.

All existing license mechanisms are routed through the get_licenser()
util method
2017-07-11 12:01:24 -04:00
Ryan Petrello
09055f9c2f fix a few issues in credential type kind validation
- fix a typo from `network` to `net`
- properly update OPTIONS for CredentialTypes to reflect allowed `kind`
  values for POST/PUT/

see: #6959
2017-07-11 09:43:55 -04:00
Ryan Petrello
6996b16d5a add additional field validation to AWX_TASK_ENV
AWX_TASK_ENV should only allow simple key-value assignment (since we're
using it to set environment variables).

see: #3508
2017-07-10 17:29:38 -04:00
Ryan Petrello
31829038bd prevent creation of custom credential types that != 'cloud || network`
see: #6959
2017-07-10 16:34:25 -04:00
Ryan Petrello
0e29f3617d periodically run orphaned task cleanup as part of the scheduler
Running orphaned task cleanup within its own scheduled task via
celery-beat causes a race-y lock contention between the cleanup task and
the task scheduler.  Unfortunately, the scheduler and the cleanup task
both run at similar intervals, so this race condition is fairly easy to
hit.  At best, it results in situations where the scheduler is
regularly delayed 20s; depending on timing, this can cause situations
where task execution is needlessly delayed a minute+.  At worst, it can
result in situations where the scheduler is never able to schedule
tasks.

This change implements the cleanup as a periodic block of code in the
scheduler itself that tracks its "last run" time in memcached (by
default, it performs a cleanup every 60 seconds)

see: #6534
2017-07-10 15:51:46 -04:00
AlanCoding
613b9205b8 unit test fixes from 3.1.4 merge 2017-07-10 11:09:56 -04:00
Ryan Petrello
7d12427497 add a new configurable, PROXY_IP_WHITELIST
implement a whitelist setting that - if populated - will only allow
specific IPs/hostnames to provide custom REMOTE_HOST_HEADERS header
values (i.e., `HTTP_X_FORWARDED_FOR`)

see: #6538
2017-07-10 10:31:45 -04:00
AlanCoding
fed2eddf07 move circular group association validation to view 2017-07-10 09:12:02 -04:00
Ryan Petrello
5fde6ead42 properly copy prompted vault passwords on job launch
see: #6924
2017-07-07 13:15:17 -04:00
Ryan Petrello
3c2fe5e6db fix a variety of bugs that break vault pass injection for playbook runs
see: #6924
2017-07-07 12:19:31 -04:00
AlanCoding
bb3c4c78f8 do not allow inv src source_project of manual type 2017-07-06 15:44:21 -04:00
Ryan Petrello
41001edf58 Merge pull request #6902 from ryanpetrello/fix-3508
Support AWX_TASK_ENV injection in task and notification invocations.
2017-07-06 14:01:13 -04:00
Ryan Petrello
12d41e2deb Support AWX_TASK_ENV injection in task and notification invocations.
This change _only_ injects `AWS_TASK_ENV` into `os.environ`; it's up to
underlying libraries to be good citizens and actually respect things
like `HTTPS_PROXY`.

see: #3508
2017-07-06 13:51:37 -04:00
Chris Meyers
e04c4e30d8 update tests to fix the removal of the word Tower 2017-07-06 11:22:16 -04:00
Aaron Tan
97e0835d1c Release unified UJT unique_together constraint. 2017-07-06 09:44:34 -04:00
Chris Meyers
958aaffa62 Merge pull request #6691 from chrismeyersfsu/enhancement-migrate_scan_job
Migrate scan job to use tower fact cache instead
2017-07-05 15:58:51 -04:00
Ryan Petrello
e82596c0da Merge pull request #6830 from ryanpetrello/fix-6769
fix a bug in the CredentialType field validator that breaks `required`
2017-07-05 10:52:51 -04:00
Ryan Petrello
2f746ef8bd Merge pull request #6877 from ryanpetrello/fix-6870
rename "Insights Basic Auth" to "Insights"
2017-07-05 10:43:40 -04:00
Chris Meyers
88b250b2f1 migrate scan jobs to use fact caching instead 2017-07-05 10:32:45 -04:00
Chris Meyers
318b1aebd1 remove special scan job logic 2017-07-05 10:32:45 -04:00
Ryan Petrello
cd7dc39703 rename "Insights Basic Auth" to "Insights"
see: #6870
2017-07-03 16:25:44 -04:00
adamscmRH
7d2102102b Fix duplicate instances, & styling 2017-07-03 15:44:12 -04:00
adamscmRH
4b3b184fc8 Fix duplicate Instances in API 2017-07-03 15:23:39 -04:00