mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 16:58:46 -03:30
Merge branch 'vagrant-unstable'
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -31,6 +31,5 @@ pep8.txt
|
|||||||
nohup.out
|
nohup.out
|
||||||
reports
|
reports
|
||||||
package.json
|
package.json
|
||||||
Vagrantfile
|
tools/vagrant/local.yml
|
||||||
ansible.cfg
|
|
||||||
*~
|
*~
|
||||||
|
|||||||
41
Vagrantfile
vendored
Normal file
41
Vagrantfile
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# -*- mode: ruby -*-
|
||||||
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
|
Vagrant.require_version '>= 1.5.1'
|
||||||
|
|
||||||
|
Vagrant.configure('2') do |config|
|
||||||
|
config.vm.define 'tower-precise', primary: true do |precise|
|
||||||
|
precise.vm.box = "precise-server-cloudimg-amd64"
|
||||||
|
precise.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
|
||||||
|
|
||||||
|
precise.vm.hostname = 'tower-precise'
|
||||||
|
|
||||||
|
precise.vm.network :private_network, ip: '33.33.33.13'
|
||||||
|
precise.vm.network :forwarded_port, guest: 80, host: 8013
|
||||||
|
precise.vm.network :forwarded_port, guest: 8080, host: 8080
|
||||||
|
precise.vm.network :forwarded_port, guest: 15672, host: 15013
|
||||||
|
precise.vm.network :forwarded_port, guest: 24013, host: 24013
|
||||||
|
|
||||||
|
precise.vm.synced_folder '.', '/var/ansible/tower/',
|
||||||
|
:mount_options => [ 'gid=5853', 'dmode=2775' ]
|
||||||
|
|
||||||
|
precise.vm.provider :virtualbox do |vb|
|
||||||
|
vb.customize ["modifyvm", :id, "--memory", '1024']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
config.ssh.forward_agent = true
|
||||||
|
|
||||||
|
config.vm.provision 'ansible' do |ansible|
|
||||||
|
ansible.extra_vars = {
|
||||||
|
'development' => true,
|
||||||
|
'target_hosts' => 'vagrant',
|
||||||
|
'target_user' => 'vagrant',
|
||||||
|
'vagrant' => true,
|
||||||
|
'vagrant_host_user' => ENV['USER'],
|
||||||
|
}
|
||||||
|
ansible.inventory_path = 'tools/dev_setup/inventory'
|
||||||
|
ansible.playbook = 'tools/dev_setup/playbook.yml'
|
||||||
|
ansible.verbose = 'v'
|
||||||
|
end
|
||||||
|
end
|
||||||
15
ansible.cfg
Normal file
15
ansible.cfg
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[defaults]
|
||||||
|
|
||||||
|
# Connections
|
||||||
|
host_key_checking = False
|
||||||
|
record_host_keys = False
|
||||||
|
pipelining = True
|
||||||
|
|
||||||
|
|
||||||
|
# Command-line specific
|
||||||
|
module_name = shell
|
||||||
|
|
||||||
|
|
||||||
|
# Paths
|
||||||
|
roles_path = setup/roles:tools/dev_setup/roles
|
||||||
|
|
||||||
@@ -23,14 +23,14 @@ def paginated(method):
|
|||||||
# Manually spin up pagination.
|
# Manually spin up pagination.
|
||||||
# How many results do we show?
|
# How many results do we show?
|
||||||
limit = api_settings.PAGINATE_BY
|
limit = api_settings.PAGINATE_BY
|
||||||
if request.GET.get(api_settings.PAGINATE_BY_PARAM, False):
|
if request.QUERY_PARAMS.get(api_settings.PAGINATE_BY_PARAM, False):
|
||||||
limit = request.GET[api_settings.PAGINATE_BY_PARAM]
|
limit = request.QUERY_PARAMS[api_settings.PAGINATE_BY_PARAM]
|
||||||
if api_settings.MAX_PAGINATE_BY:
|
if api_settings.MAX_PAGINATE_BY:
|
||||||
limit = min(api_settings.MAX_PAGINATE_BY, limit)
|
limit = min(api_settings.MAX_PAGINATE_BY, limit)
|
||||||
limit = int(limit)
|
limit = int(limit)
|
||||||
|
|
||||||
# What page are we on?
|
# What page are we on?
|
||||||
page = int(request.GET.get('page', 1))
|
page = int(request.QUERY_PARAMS.get('page', 1))
|
||||||
offset = (page - 1) * limit
|
offset = (page - 1) * limit
|
||||||
|
|
||||||
# Add the limit, offset, and page variables to the keyword arguments
|
# Add the limit, offset, and page variables to the keyword arguments
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import urlparse
|
import urlparse
|
||||||
|
import unittest
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@@ -872,6 +873,9 @@ class InventoryImportTest(BaseCommandMixin, BaseLiveServerTest):
|
|||||||
self.assertEqual(new_inv.total_groups, ngroups)
|
self.assertEqual(new_inv.total_groups, ngroups)
|
||||||
self.assertElapsedLessThan(30)
|
self.assertElapsedLessThan(30)
|
||||||
|
|
||||||
|
@unittest.skipIf(getattr(settings, 'LOCAL_DEVELOPMENT', False),
|
||||||
|
'Skip this test in local development environments, '
|
||||||
|
'which may vary widely on memory.')
|
||||||
def test_large_inventory_file(self):
|
def test_large_inventory_file(self):
|
||||||
new_inv = self.organizations[0].inventories.create(name='largeinv')
|
new_inv = self.organizations[0].inventories.create(name='largeinv')
|
||||||
self.assertEqual(new_inv.hosts.count(), 0)
|
self.assertEqual(new_inv.hosts.count(), 0)
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ if 'django_jenkins' in INSTALLED_APPS:
|
|||||||
JSHINT_CHECKED_FILES = [os.path.join(BASE_DIR, 'ui/static/js'),
|
JSHINT_CHECKED_FILES = [os.path.join(BASE_DIR, 'ui/static/js'),
|
||||||
os.path.join(BASE_DIR, 'ui/static/lib/ansible'),]
|
os.path.join(BASE_DIR, 'ui/static/lib/ansible'),]
|
||||||
|
|
||||||
|
# If there is an `/etc/awx/settings.py`, include it.
|
||||||
|
include(optional('/etc/awx/settings.py'), scope=locals())
|
||||||
|
|
||||||
# If any local_*.py files are present in awx/settings/, use them to override
|
# If any local_*.py files are present in awx/settings/, use them to override
|
||||||
# default settings for development. If not present, we can still run using
|
# default settings for development. If not present, we can still run using
|
||||||
# only the defaults.
|
# only the defaults.
|
||||||
|
|||||||
Reference in New Issue
Block a user