mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 12:39:22 -02:30
Merge pull request #6794 from ryanpetrello/fix-6748
more isolated production tinkering
This commit is contained in:
@@ -78,7 +78,8 @@ class IsolatedManager(object):
|
|||||||
'CALLBACK_QUEUE': '',
|
'CALLBACK_QUEUE': '',
|
||||||
'CALLBACK_CONNECTION': '',
|
'CALLBACK_CONNECTION': '',
|
||||||
'ANSIBLE_RETRY_FILES_ENABLED': 'False',
|
'ANSIBLE_RETRY_FILES_ENABLED': 'False',
|
||||||
'ANSIBLE_HOST_KEY_CHECKING': 'False'
|
'ANSIBLE_HOST_KEY_CHECKING': 'False',
|
||||||
|
'ANSIBLE_LIBRARY': os.path.join(os.path.dirname(awx.__file__), 'plugins', 'isolated')
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -204,7 +205,7 @@ class IsolatedManager(object):
|
|||||||
os.symlink(self.cwd, self.path_to('project'))
|
os.symlink(self.cwd, self.path_to('project'))
|
||||||
|
|
||||||
# create directories for build artifacts to live in
|
# create directories for build artifacts to live in
|
||||||
os.makedirs(self.path_to('artifacts', 'job_events'), mode=stat.S_IRUSR | stat.S_IWUSR)
|
os.makedirs(self.path_to('artifacts', 'job_events'), mode=stat.S_IXUSR + stat.S_IWUSR + stat.S_IRUSR)
|
||||||
|
|
||||||
def _missing_artifacts(self, path_list, buff):
|
def _missing_artifacts(self, path_list, buff):
|
||||||
missing_artifacts = filter(lambda path: not os.path.exists(path), path_list)
|
missing_artifacts = filter(lambda path: not os.path.exists(path), path_list)
|
||||||
@@ -347,7 +348,6 @@ class IsolatedManager(object):
|
|||||||
args = ['ansible-playbook', '-u', settings.AWX_ISOLATED_USERNAME, '-i',
|
args = ['ansible-playbook', '-u', settings.AWX_ISOLATED_USERNAME, '-i',
|
||||||
hostname_string, 'heartbeat_isolated.yml']
|
hostname_string, 'heartbeat_isolated.yml']
|
||||||
env = cls._base_management_env()
|
env = cls._base_management_env()
|
||||||
env['ANSIBLE_LIBRARY'] = os.path.join(os.path.dirname(awx.__file__), 'lib', 'management_modules')
|
|
||||||
env['ANSIBLE_STDOUT_CALLBACK'] = 'json'
|
env['ANSIBLE_STDOUT_CALLBACK'] = 'json'
|
||||||
|
|
||||||
buff = cStringIO.StringIO()
|
buff = cStringIO.StringIO()
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ def test_build_isolated_job_data(private_data_dir, rsa_key):
|
|||||||
|
|
||||||
path = os.path.join(private_data_dir, 'artifacts')
|
path = os.path.join(private_data_dir, 'artifacts')
|
||||||
assert os.path.isdir(path)
|
assert os.path.isdir(path)
|
||||||
assert stat.S_IMODE(os.stat(path).st_mode) == stat.S_IRUSR + stat.S_IWUSR # user rw
|
assert stat.S_IMODE(os.stat(path).st_mode) == stat.S_IXUSR + stat.S_IWUSR + stat.S_IRUSR # user rwx
|
||||||
|
|
||||||
path = os.path.join(private_data_dir, 'args')
|
path = os.path.join(private_data_dir, 'args')
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user