Ryan Petrello
0bc5665e92
remove the legacy fact cleanup system template
...
see: https://github.com/ansible/tower/issues/1021
2018-04-25 14:20:19 -04:00
Ryan Petrello
c98ede2f27
fix a bug in custom virtualenv when Project.organization is None
...
see: https://github.com/ansible/tower/issues/1490
2018-04-24 16:53:10 -04:00
Ryan Petrello
19d5d71937
unpin botocore now that an upstream dependency issue is resolved
...
related: https://github.com/ansible/awx/commit/4f585dd09e35c2ab1011e8ea93e6533be8877329
related: https://github.com/boto/botocore/pull/1433
2018-04-23 14:43:09 -04:00
Ryan Petrello
b1028a2e0a
fix a bug preventing custom credential templates from including unicode
...
see: https://github.com/ansible/tower/issues/1266
2018-04-09 17:08:10 -04:00
Ryan Petrello
18c95bf706
add exception handling to deprecated v1 credential support
...
see: https://github.com/ansible/tower/issues/1268
2018-04-09 14:23:43 -04:00
Ryan Petrello
ba66996add
missing import for celery failure handler
2018-04-09 09:10:50 -04:00
Ryan Petrello
4c0096a524
implement celery failure logging using CELERY_ANNOTATIONS
...
see: https://github.com/ansible/awx/issues/1720
see: https://github.com/ansible/tower/issues/1190
2018-04-06 11:23:23 -04:00
Ryan Petrello
5f01d26224
automatically encrypt/decrypt main_oauth2application.client_secret
...
see: https://github.com/ansible/awx/issues/1416
2018-04-04 15:35:24 -04:00
Ryan Petrello
4b518298a6
remove old crusty test fixtures
2018-04-04 09:32:17 -04:00
Ryan Petrello
0db24a5c97
more gracefully account for undefined stdout
...
see: https://github.com/ansible/tower/issues/1215
related: https://github.com/ansible/tower/pull/1192#issuecomment-377982131
2018-04-04 08:29:57 -04:00
Ryan Petrello
31a0eab880
add more custom credential type env blacklist items
...
see: https://github.com/ansible/tower/issues/1224
2018-04-03 15:44:44 -04:00
Ryan Petrello
5fd5c95a1d
only record task.args in the callback plugin if DISPLAY_ARGS_TO_STDOUT
...
see: https://github.com/ansible/awx/issues/1633
2018-04-03 10:52:55 -04:00
Ryan Petrello
f8c40cc26f
properly support v2_playbook_on_notify in ansible 2.5+
...
see: https://github.com/ansible/awx/issues/1705
see: https://github.com/ansible/tower/issues/1205
related: https://github.com/ansible/ansible/pull/32633
2018-04-03 08:53:13 -04:00
Ryan Petrello
23267bce38
properly filter disabled hosts on smart inventory composition
...
see: https://github.com/ansible/tower/issues/1053
2018-03-28 15:16:26 -04:00
Ryan Petrello
21d629531f
remove an RRULE parsing bug fix that landed upstream in python-dateutil
...
related: a2a246a834
2018-03-26 18:02:52 -04:00
Ryan Petrello
a2a246a834
update to a newer python-dateutil with more bug fixes we were vendoring
...
related: dateutil/dateutil#649
2018-03-26 17:12:01 -04:00
Ryan Petrello
f59f47435b
send job notification templates _after_ all events have been processed
...
see: https://github.com/ansible/awx/issues/500
2018-03-22 09:30:41 -04:00
Ryan Petrello
6a96e6a268
dynamically set worker autoscale max_concurrency based on system memory
2018-03-21 11:10:48 -04:00
Ryan Petrello
918f372c20
add uwsgitop as a dependency
...
see: https://github.com/ansible/ansible-tower/issues/7966
2018-03-19 08:53:30 -04:00
Ryan Petrello
4f585dd09e
pin botocore to avoid dependency hell re: latest python-dateutil
...
boto decided to pin python-dateutil on a version _lower than_ what we
need for the TZID= bug fix:
https://github.com/boto/botocore/commit/90d7692702be1a423af15e0f49b58365f2a400f2#diff-b4ef698db8ca845e5845c4618278f29a
2018-03-16 16:08:03 -04:00
Ryan Petrello
44adab0e9e
bump python-dateutil to latest
...
this change provides support for numerous bug fixes, along with
support for parsing TZINFO= from rrule strings
related: https://github.com/ansible/ansible-tower/issues/823
related: https://github.com/dateutil/dateutil/issues/614
2018-03-12 12:20:03 -04:00
Ryan Petrello
a61187e132
restrict API filtering on oauth-related fields
...
related: https://github.com/ansible/awx/issues/1354
2018-03-12 09:16:37 -04:00
Ryan Petrello
397b9071a6
properly categorize OAuth2 endpoints for swagger autogen
2018-03-09 15:07:50 -05: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
Ryan Petrello
8887be5952
add validation to InventorySource.inventory to avoid task manager death
...
see: https://github.com/ansible/awx/issues/1438
2018-03-05 14:40:57 -05:00
Ryan Petrello
13672cc88c
fix busted shippable builds
2018-03-05 14:16:42 -05:00
Ryan Petrello
b9ab06734d
don't inject custom extra_vars for inventory updates
...
see: https://github.com/ansible/awx/issues/1366
2018-02-27 16:10:23 -05:00
Ryan Petrello
d743b77353
replace our rdb tooling w/ the sdb PyPI package
2018-02-26 19:05:50 -05:00
Ryan Petrello
7741de5153
set $HOME via an API call so AWX_TASK_ENV isn't marked as readonly
...
see: https://github.com/ansible/awx/issues/1315
2018-02-26 16:35:36 -05:00
Ryan Petrello
35f629d42c
Revert "changes to license compliance"
...
This reverts commit 218dfb680e .
2018-02-22 15:02:33 -05:00
Ryan Petrello
7d9e4d6e2f
support fact caching for isolated hosts
...
see: https://github.com/ansible/awx/issues/198
2018-02-20 15:00:47 -05:00
Ryan Petrello
ac3ce82eb1
remove dead code
...
the code that persists `set_stat` data for workflows now lives elsewhere
related: https://github.com/ansible/awx/commit/d57470ce49f80afd6b510667be151b035f7b0e55
2018-02-20 14:14:23 -05:00
Ryan Petrello
56e3d98e62
don't require credentials to relaunch a job
...
see: https://github.com/ansible/awx/issues/1291
2018-02-19 11:15:55 -05:00
Ryan Petrello
218dfb680e
changes to license compliance
...
now if a license is expired or over the managed node limit, it won't
prevent host creation or Job/JobTemplate launches
see: https://github.com/ansible/ansible-tower/issues/7860
2018-02-14 15:51:19 -05:00
Ryan Petrello
1c62c142f1
we don't use travis for tests; remove .travis.yml
2018-02-14 10:07:17 -05:00
Ryan Petrello
613d48cdbc
add support for new "BECOME" prompt in Ansible 2.5+ for adhoc commands
...
see: https://github.com/ansible/ansible-tower/issues/7850
2018-02-13 14:26:27 -05:00
Ryan Petrello
82e41b40bb
enforce strings for secret password inputs on Credentials
...
see: https://github.com/ansible/ansible-tower/issues/7898
2018-02-12 17:03:32 -05:00
Ryan Petrello
194c2dcf0b
improve a bwrap test
2018-02-12 10:14:37 -05:00
Ryan Petrello
2a168faf6a
upgrade to the latest pexpect
...
see: https://github.com/ansible/awx/issues/417
2018-02-12 09:18:14 -05:00
Ryan Petrello
605c5e3276
fix celery pid restart issues
2018-02-09 11:03:00 -05:00
Ryan Petrello
3c43aaef21
normalize dates in the Swagger output to minimize diffs
2018-02-09 10:16:27 -05:00
Ryan Petrello
fe02abe630
move swagger doc metadata out of the awx repo
2018-02-09 09:45:23 -05:00
Ryan Petrello
7472026cca
remove the new_in_<version> in API doc gen
...
see: https://github.com/ansible/awx/issues/73
2018-02-08 16:21:22 -05:00
Ryan Petrello
72715df751
fix a bug for "users should be able to change type of unused credential"
...
see: https://github.com/ansible/ansible-tower/issues/7516
related: https://github.com/ansible/tower/pull/441
2018-02-08 15:44:14 -05:00
Ryan Petrello
f2c5859fde
properly handle STDOUT_MAX_BYTES_DISPLAY for system jobs
...
see: https://github.com/ansible/ansible-tower/issues/7890
2018-02-08 11:37:05 -05:00
Ryan Petrello
5b9dc41015
add indention to swagger docs
...
this will make it easier to spot changes as our APIs change
2018-02-08 10:51:42 -05:00
Ryan Petrello
c866d85b8c
update zoneinfo endpoint to be a list of dicts
2018-02-08 09:12:26 -05:00
Ryan Petrello
3c799b007e
don't allow rrule values that contain both COUNT and UNTIL
...
see: https://github.com/ansible/ansible-tower/issues/7887
2018-02-08 08:59:52 -05:00
Ryan Petrello
887f16023a
improve detection of expensive DTSTART RRULE values
2018-02-08 08:54:30 -05:00
Ryan Petrello
1adb4cefec
fix a bad swagger-related import that breaks the build
2018-02-07 08:56:59 -05:00
Ryan Petrello
cc3659d375
fix a busted swagger import
2018-02-06 13:43:31 -05:00
Ryan Petrello
b1695fe107
add instructions for generating Swagger/OpenAPI docs
2018-02-06 13:37:33 -05:00
Ryan Petrello
8b976031cb
use VERSION_TARGET for Swagger doc generation
2018-02-06 10:48:51 -05:00
Ryan Petrello
7ff9f0b7d1
build example Swagger request and response bodies from our API tests
2018-02-06 10:36:25 -05:00
Ryan Petrello
527594285f
more Swagger template markup
2018-02-06 10:12:58 -05:00
Ryan Petrello
07dfab648c
add some tests to prove that OpenAPI JSON compilation works
2018-02-06 10:12:58 -05:00
Ryan Petrello
10974159b5
add support for marking Swagger paths deprecated
2018-02-06 10:12:58 -05:00
Ryan Petrello
ac7c5f8648
clean up API markdown docs
2018-02-06 10:12:57 -05:00
Ryan Petrello
57c22c20b2
add support for building swagger/OpenAPI JSON
...
to build, run `make swagger`; a file named `swagger.json` will be
written to the current working directory
2018-02-06 10:12:57 -05:00
Ryan Petrello
35230eded1
run the celery reload in a shell so the uwsgi hook isn't fatal on fail
2018-02-01 22:32:08 -05:00
Ryan Petrello
0a8df7fde2
work around a bug in dateutil that incorrectly parses Z dates
...
related: https://github.com/dateutil/dateutil/issues/349
2018-02-01 15:51:59 -05:00
Ryan Petrello
81bdbef785
fix a bug which can break the schedules list endpoint
...
see: https://github.com/ansible/ansible-tower/issues/7881
related: https://github.com/ansible/awx/pull/1095
2018-02-01 14:30:56 -05:00
Ryan Petrello
8ddc1c61ef
add related links to the inventory and project for a schedule
...
see: https://github.com/ansible/awx/issues/276
2018-01-31 15:18:11 -05:00
Ryan Petrello
0aa6c7b83f
remove some leaky mock.patch() that were causing sporadic test failures
2018-01-31 15:12:59 -05:00
Ryan Petrello
2a6f6111dc
add documentation for how awx uses/interacts with ansible
2018-01-31 14:02:18 -05:00
Ryan Petrello
81af34fce3
fix a bug which causes /api/v2/auth/ to list disabled auth backends
...
see: https://github.com/ansible/awx/issues/1073
2018-01-30 16:20:29 -05:00
Ryan Petrello
8fed469975
fix a bug in custom venv support that breaks legacy POST /api/v1/jobs
...
see: https://github.com/ansible/ansible-tower/issues/7876
2018-01-30 15:29:11 -05:00
Ryan Petrello
e642af82cc
fix a few bugs for scheduled jobs that run without inventories
...
see: https://github.com/ansible/ansible-tower/issues/7865
see: https://github.com/ansible/ansible-tower/issues/7866
2018-01-29 15:15:57 -05:00
Ryan Petrello
6753f1ca35
adhere to RFC5545 regarding UNTIL timezones
...
If the "DTSTART" property is specified as a date with UTC time or a date with
local time and time zone reference, then the UNTIL rule part MUST be specified
as a date with UTC time.
2018-01-29 12:42:31 -05:00
Ryan Petrello
982539f444
fix a bug when testing UDP-based logging configuration
...
see: https://github.com/ansible/ansible-tower/issues/7868
2018-01-29 12:05:51 -05:00
Ryan Petrello
6f0c937236
don't allow distant DTSTART values for schedules; it's slow
...
see: https://github.com/ansible/ansible-tower/issues/7869
2018-01-29 10:16:03 -05:00
Ryan Petrello
a15e257b9e
fix a unicode bug in the stdout endpoint when ?content_encoding=base64
...
see: https://github.com/ansible/awx/issues/1042
2018-01-25 15:53:43 -05:00
Ryan Petrello
e7ed4811c1
reload the entire celery worker pool when uwsgi reloads the Python app
...
this is for the development environment only; when uwsgi notices a code
change, it automatically reloads the uwsgi workers; this patch includes
a hook that sends `SIGHUP` to the celery process, causing it to spawn
a new set of workers as well
2018-01-25 14:59:40 -05:00
Ryan Petrello
ef80ecd3b6
only import the redbaron library on-demand
...
redbaron is a library we use to facilitate parsing local settings files;
at _import_ time it generates a parse tree and caches it to disk at
`/tmp`; this process is _really time consuming, and only necessary if
we're actually *using* the library
right now, we're importing this library and paying the penalty
_every_ time we load the awx application
2018-01-25 10:23:44 -05:00
Ryan Petrello
d57470ce49
don't process artifacts from custom set_stat calls asynchronously
...
previously, we persisted custom artifacts to the database on
`Job.artifacts` via the callback receiver. when the callback receiver
is backed up processing events, this can result in race conditions for
workflows where a playbook calls `set_stat()`, but the artifact data is
not persisted in the database before the next job in the workflow starts
see: https://github.com/ansible/ansible-tower/issues/7831
2018-01-23 17:09:23 -05:00
Ryan Petrello
9857c8272e
add more tests for weird timezone/DST boundaries in schedules
...
see: https://github.com/ansible/awx/pull/1024
2018-01-22 14:57:57 -05:00
Ryan Petrello
15906b7e3c
support TZID= in schedule rrules
...
this commit allows schedule `rrule` strings to include local timezone
information via TZID=NNNNN; occurrences are _generated_ in the local
time specific by the user (or UTC, if e.g., DTSTART:YYYYMMDDTHHMMSSZ)
while Schedule.next_run, Schedule.dtstart, and Schedule.dtend will be
stored in the UTC equivalent (i.e., the scheduler will still do math on
"what to run next" based on UTC datetimes).
in addition to this change, there is now a new API endpoint,
`/api/v2/schedules/preview/`, which takes an rrule and shows the next
10 occurrences in local and UTC time.
see: https://github.com/ansible/ansible-tower/issues/823
related: https://github.com/dateutil/dateutil/issues/614
2018-01-22 11:50:00 -05:00
Ryan Petrello
ac3f7d0fac
fix a bug that breaks workflows w/ a survey password + inventory sync
...
prior versions of awx did not raise an exception for this scenario
- they simply ignored kwargs that they couldn't accept. this change is
a sort of middle ground - it ignores them, but gives a clue in the logs
as to why
see: https://github.com/ansible/awx/issues/955
related: https://github.com/ansible/awx/pull/803
2018-01-22 09:41:30 -05:00
Ryan Petrello
43f19cc94b
fix another bug that breaks the JT callback process
...
see: https://github.com/ansible/awx/issues/980
related: 17cd0595d7
2018-01-18 13:17:06 -05:00
Ryan Petrello
e5aaeedc43
don't require an IRC password in the notification UI
...
see: https://github.com/ansible/awx/issues/1010
2018-01-18 09:14:22 -05:00
Ryan Petrello
dbb4d2b011
refactor credential injection for builtin types
...
this cleanups up a _lot_ of code duplication that we have for builtin
credential types. it will allow customers to setup custom inventory
sources that utilize builtin credential types (e.g., a custom inventory
script that could use an AzureRM credential)
see: https://github.com/ansible/ansible-tower/issues/7852
2018-01-17 16:50:28 -05:00
Ryan Petrello
838b793704
fix a minor unicode handling bug in project names
...
see: https://github.com/ansible/ansible-tower/issues/7853
2018-01-17 13:37:06 -05:00
Ryan Petrello
17cd0595d7
fix a bug which broke the callback plugin launch process
...
see: https://github.com/ansible/awx/issues/980
2018-01-17 11:28:13 -05:00
Ryan Petrello
51f7907a01
optimize OutputEventFilter for large stdout streams
...
update our event data search algorithm to be a bit lazier in event data
discovery; this drastically improves processing speeds for stdout >5MB
see: https://github.com/ansible/awx/issues/417
2018-01-16 14:41:35 -05:00
Ryan Petrello
2955842c44
don't overwrite env['ANSIBLE_LIBRARY'] when fact caching is enabled
...
see: https://github.com/ansible/awx/issues/815
see: https://github.com/ansible/ansible-tower/issues/7830
2018-01-15 13:39:46 -05:00
Ryan Petrello
e1d50a43fd
only allow facts to cache in the proper file system location
2018-01-15 11:45:49 -05:00
Ryan Petrello
983b192a45
replace our memcached-based fact cache implementation with local files
...
see: https://github.com/ansible/ansible-tower/issues/7840
2018-01-15 09:16:44 -05:00
Ryan Petrello
4a2ca20b60
fix a minor bug in the JT launch related to support for zero credentials
...
see: https://github.com/ansible/ansible-tower/issues/7841
2018-01-12 11:37:33 -05:00
Ryan Petrello
563f730268
add support for new "BECOME" prompt in Ansible 2.5+
...
see: https://github.com/ansible/ansible-tower/issues/7850
2018-01-12 10:40:40 -05:00
Ryan Petrello
b8758044e0
fix a bug in inventory generation for isolated nodes
...
see: https://github.com/ansible/ansible-tower/issues/7849
related: https://github.com/ansible/awx/pull/551
2018-01-11 10:41:58 -05:00
Ryan Petrello
a5007ccd41
fix a unicode handling bug
...
see: https://github.com/ansible/ansible-tower/issues/7843
related: https://github.com/ansible/awx/pull/807
2018-01-10 15:56:31 -05:00
Ryan Petrello
b01b229fea
add an example for custom virtualenv setup in containers
2018-01-10 13:48:55 -05:00
Ryan Petrello
4c40791d06
properly handle unicode for isolated job buffers
...
from: https://docs.python.org/2/library/stringio.html#module-cStringIO
"Unlike the StringIO module, this module is not able to accept Unicode
strings that cannot be encoded as plain ASCII strings."
see: https://github.com/ansible/ansible-tower/issues/7846
2018-01-10 10:56:59 -05:00
Ryan Petrello
4bb2b5768e
properly compose stdout downloads that contain unicode
2018-01-09 23:52:02 -05:00
Ryan Petrello
c0a641ed52
properly handle unicode for isolated job buffers
...
from: https://docs.python.org/2/library/stringio.html#module-cStringIO
"Unlike the StringIO module, this module is not able to accept Unicode
strings that cannot be encoded as plain ASCII strings."
see: https://github.com/ansible/ansible-tower/issues/7846
2018-01-09 23:46:17 -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
Ryan Petrello
60743d6ba6
add the vault_id to the response payload on the JT launch endpoint
...
see: https://github.com/ansible/awx/issues/914
2018-01-04 15:13:48 -05:00
Ryan Petrello
f28f7c6184
refactor job event signal generation code
2018-01-04 12:50:12 -05:00
Ryan Petrello
1494c8395b
update websockets docs to reflect new event groups
2018-01-04 11:40:15 -05:00
Ryan Petrello
2691e1d707
make the fact caching plugin fail more gracefully for large payloads
...
related: https://github.com/ansible/ansible/pull/34424
2018-01-04 11:33:47 -05:00