mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 17:07:33 -02:30
AWX dev environment changes for receptor work signing feature
-- Updated devel build to take most recent receptor binary -- Added signWork parameter when sedning job to receptor -- Modified docker-compose tasks to generate RSA key pair to use for work-signing -- Modified docker-compose templates and jinja templates for implementing work-sign -- Modified Firewall rules on the receptor jinja config Add firewall rules to dev env
This commit is contained in:
@@ -478,7 +478,10 @@ def inspect_execution_nodes(instance_list):
|
||||
for ad in connections:
|
||||
hostname = ad['NodeID']
|
||||
commands = ad.get('WorkCommands') or []
|
||||
if 'ansible-runner' not in commands:
|
||||
worktypes = []
|
||||
for c in commands:
|
||||
worktypes.append(c["WorkType"])
|
||||
if 'ansible-runner' not in worktypes:
|
||||
continue
|
||||
changed = False
|
||||
if hostname in node_lookup:
|
||||
@@ -3053,7 +3056,7 @@ class AWXReceptorJob:
|
||||
use_stream_tls = get_conn_type(_kw['node'], receptor_ctl).name == "STREAMTLS"
|
||||
_kw['tlsclient'] = get_tls_client(use_stream_tls)
|
||||
|
||||
result = receptor_ctl.submit_work(worktype=self.work_type, payload=sockout.makefile('rb'), params=self.receptor_params, **_kw)
|
||||
result = receptor_ctl.submit_work(worktype=self.work_type, payload=sockout.makefile('rb'), params=self.receptor_params, signwork=True, **_kw)
|
||||
self.unit_id = result['unitid']
|
||||
self.task.update_model(self.task.instance.pk, work_unit_id=result['unitid'])
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ def worker_info(node_name, work_type='ansible-runner'):
|
||||
|
||||
kwargs = {}
|
||||
kwargs['tlsclient'] = get_tls_client(use_stream_tls)
|
||||
kwargs['signwork'] = True
|
||||
if work_type != 'local':
|
||||
kwargs['ttl'] = '20s'
|
||||
result = receptor_ctl.submit_work(worktype=work_type, payload='', params={"params": f"--worker-info"}, node=node_name, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user