50 Commits

Author SHA1 Message Date
Steve Wills
f0cf325831 Add whitespace around arithmetic operator
Signed-off-by: Steve Wills <steve@mouf.net>
2017-09-13 11:37:57 -04:00
Steve Wills
b8651bfd72 Make get_system_task_capacity portable
Signed-off-by: Steve Wills <steve@mouf.net>
2017-09-13 11:15:09 -04:00
AlanCoding
41940687f1
Pass existing object references within access methods
This avoids re-loading objects from the database in our
chain of permission checking, wherever possible.
access.py is equiped to handle object references instead
of pk ints, and permissions.py is changed to pass those refs.
2017-09-06 16:34:00 -07:00
Ryan Petrello
60da24d82f fix a few activity stream bugs related to setting creation/update
* when a setting is created, only create *one* activity stream record
  for the creation, not one for create and another for update (similar
  to https://github.com/ansible/tower/pull/53)
* add code to hide `$encrypted$` activity stream content

see: https://github.com/ansible/ansible-tower/issues/7320
2017-07-27 11:51:10 -04:00
Aaron Tan
c3f2a8a140 Merge pull request #81 from jangsutsr/6344_enforce_extra_vars_override_hierachy
Enforce extra_vars override hierachy
2017-07-27 09:21:25 -04:00
Aaron Tan
047ad7ca4a Enforce extra_vars override hierachy 2017-07-26 18:10:33 -04:00
Matthew Jones
c7a85d9738 Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -04:00
Ryan Petrello
e29492a259 more tower -> awx for task execution and isolated tooling 2017-07-25 10:36:06 -04:00
AlanCoding
eaeff7e290 rename setting TOWER_VENV_PATH to AWX_VENV_PATH 2017-07-24 12:23:54 -04:00
Matthew Jones
3892e4e389 Tower -> AWX Tooling Migration
* Switching version number scheme and mechanism
* Refactor development tooling towards 'awx' paths and names
* Purging packaging details from Makefile
2017-07-21 17:06:45 -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
Ryan Petrello
80224b791d avoid a race condition in recording deletions in the activity stream
1. You delete something.
2. A signal is generated to record an activity stream deletion.
3. The process of deleting that activity stream deletion attempts to
   look up a related field which has been deleted (in the meantime) via
   a cascade.

see: #6721
see: #7022
2017-07-12 16:39:39 -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
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
Bill Nottingham
fe46c6f3b3 Merge pull request #6888 from wenottingham/quote-of-the-day
Ensure we quote '/' in username/password for SCM credentials.
2017-07-05 14:27:03 -04:00
Ryan Petrello
0a5b9c458b standardize tasks.py temporary file paths under a single parameter
see: #3472
2017-07-05 13:50:43 -04:00
Bill Nottingham
09f5c23737 Ensure we quote '/' in username/password for SCM credentials. 2017-07-05 11:45:29 -04:00
Ryan Petrello
bd3bfbe1d1 Merge pull request #6640 from ryanpetrello/remove_use_venv
remove ANSIBLE_USE_VENV and TOWER_USE_VENV
2017-06-28 10:22:09 -04:00
Alan Rominger
2c92f623d8 Merge pull request #6617 from ansible/isolated_setup
setup playbook and heartbeat for isolated deployments
2017-06-20 17:20:53 -04:00
AlanCoding
40287d8e78 multi-host isolated heartbeat w tower-isolated check
* use tower-expect command to determine job status when running
  the isolated heartbeat playbook
* grok JSON output of playbook to obtain result information
* run playbook against multiple isolated hosts at the same time
  (addresses scalability concerns)
2017-06-20 14:36:18 -04:00
Ryan Petrello
2e608f4eac remove ANSIBLE_USE_VENV and TOWER_USE_VENV
modern Tower deployments (both production and dev container-based)
always build ansible and Tower in separate, distinct virtualenvs, not
the global site-packages
2017-06-19 16:11:15 -04:00
Ryan Petrello
2ba9e56033 Include the Tower venv in the isolated bubblewrapped arguments.
This moves the container-based code location and venvs.
The goal here is that the paths of Tower source for isolated
vs normal nodes matches (both in prod and local development) so that we
don't have to add a bunch of additional bwrap argument logic for
<location-of-isolated-tower-venv>.
2017-06-19 15:52:54 -04:00
AlanCoding
7eb8fdd0f1 Change use of subprocess lib for calculating system capacity
Suggested by Ryan Petrello as a part of the PR feedback
for the isolated instance setup work.
2017-06-19 12:13:36 -04:00
Ryan Petrello
422950f45d Support for executing job and adhoc commands on isolated Tower nodes (#6524) 2017-06-14 11:47:30 -04:00
Wayne Witzel III
b5d61c3c53 Relocate encryption helpers, update settings, tests, and imports 2017-06-12 09:54:12 -04:00
Aaron Tan
b09ad85978 Add count to host group summary field. 2017-06-09 17:53:41 -04:00
Aaron Tan
b50820fa60 Merge pull request #6305 from jangsutsr/6272_prevent_nested_encrypted_field_leak_in_activity_stream
Prevent nested encrypted field leak in activity stream
2017-05-24 09:55:29 -04:00
Aaron Tan
7f1f68ee28 Prevent nested encrypted field leak in activity stream. 2017-05-23 14:05:55 -04:00
Bill Nottingham
a1de115094 Merge pull request #6306 from wenottingham/what-is-a-real-path-anyway
Perform realpath() on paths passed to bubblewrap to avoid errors with symlinks
2017-05-22 11:07:02 -04:00
Bill Nottingham
ff454a452f Perform realpath() on paths passed to bubblewrap to avoid errors with symlinks
bubblewrap is creating a mount tree from a namespace outside the one it's
creating.  Absolute symlinks will not resolve properly, causing errors.

Filed @ https://github.com/projectatomic/bubblewrap/issues/195, but
this should work around it without side effects.
2017-05-19 16:51:39 -04:00
Wayne Witzel III
bac1e8b4fe Extend SmartFilter to expand search and related search fields 2017-05-19 16:05:24 -04:00
Ryan Petrello
44c1935590 Merge pull request #6232 from ryanpetrello/jt_promptable_extra_creds
add prompting for JT.extra_credentials
2017-05-11 07:51:36 -04:00
Ryan Petrello
53c3ece32b add prompting for JT.extra_credentials
see: #2913
2017-05-11 07:29:53 -04:00
Ryan Petrello
f7660e1778 properly filter User.password from ActivityStream entries
see: #6160
2017-05-09 14:56:27 -04:00
Matthew Jones
e1e83598e9 Merge branch 'release_3.1.3' into devel
* release_3.1.3: (52 commits)
  ack fact scan messages
  making ldap user/group search fields into codemirror instances
  removing UI parsing for LDAP User and Group Search fields
  Allow exception view to accept all valid HTTP methods.
  Restore ability of parsing extra_vars string for provisioning callback.
  Fix up backup/restore role broken in f7a8e45809758322d9ee41c5305850dd70ed5faf
  Stop / start ansible-tower-service during restores
  value_to_python should encode lookup fields as ascii
  fix brace interpolation on standard out pane
  Adjust some hardcoded usages of 'awx' to use 'aw_user' and 'aw_group'.
  Pull Spanish updates from Zanata
  Temporarily grant awx user createdb role
  Stop giving ownership of backups to postgres
  don't display chunked lines'
  Add dropdown li truncation with ellipsis
  CTiT -> adhoc modules should allow the user to add new modules
  Remove task that was replacing the supervisor systemd tmp file
  Fix failing supervisorctl commands on RH-based distros
  Give ownership of the supervisor socket to awx
  Setting for external log emissions cert verification
  ...
2017-04-28 13:57:04 -04:00
Aaron Tan
3a81ca0dce Restore ability of parsing extra_vars string for provisioning callback. 2017-04-24 17:43:20 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Matthew Jones
2656e3f3fa Insights project api side integration
* Extend scm credential type to support username and password for
  redhat portal accounts
* Update project update playbook to work with remote insights server
2017-03-07 16:48:44 -05:00
Matthew Jones
785a8d0789 Fix an issue where smtplib can't handle unicode strings
We probably do get this value as unicode originally but when we store
it, due to a recently fixed bug it will come out as *not* unicode.

So things were accidentally working because py2 smtplib uses hmac
which won't accept unicode.

This change adds a flag to encrypt_field that forces it to skip the
utf8 fixup from before for narrow use cases.
2017-02-15 14:07:30 -05:00
Ryan Petrello
2c7cb4a370 add utf-8 support to utils.common.encrypt_field/decrypt_field 2017-02-13 16:09:31 -05:00
Alan Rominger
b8aa1bd76e Merge pull request #5191 from AlanCoding/UJT_capability_prefetch
Unified Job Template user_capability prefetch + listview optimizations
2017-02-06 10:18:26 -05:00
AlanCoding
7967cc7722 force UJT user_capabilities to be correct for all submodels 2017-02-05 08:07:36 -05:00
AlanCoding
914288c982 adapt the capabilities_prefetch to work with unified models 2017-02-03 15:59:35 -05:00
Matthew Jones
0139bccde3 Make sure stdout always lines up with what is expected out ansible
Also, strip superflous extra newlines at the end of job events, this
helps downloaded stdout line up.
2017-02-03 15:37:35 -05:00
Ryan Petrello
557bc8006d automatically encrypt/decrypt CTinT settings that are stored in memcached
addresses #4246
2017-02-01 12:53:10 -05:00
Matthew Jones
66426aa7dd Store project update and inventory update stdout in the database
So things work across the cluster
2017-01-27 16:51:03 -05:00
Chris Meyers
55827611b6 filter out ansible_* facts from provision callback extra_vars
related to #4358
2016-12-15 15:37:56 -05:00
AlanCoding
7848198b9f New awx.main.utils directory, distributed task to invalidate settings 2016-12-02 14:36:04 -05:00