mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Do not install ansible-runner or podman on hop nodes
This commit is contained in:
parent
81e06dace2
commit
70ba32b5b2
@ -4,12 +4,16 @@ receptor_group: awx
|
||||
receptor_verify: true
|
||||
receptor_tls: true
|
||||
receptor_mintls13: false
|
||||
{% if instance.node_type == "execution" %}
|
||||
receptor_work_commands:
|
||||
ansible-runner:
|
||||
command: ansible-runner
|
||||
params: worker
|
||||
allowruntimeparams: true
|
||||
verifysignature: true
|
||||
additional_python_packages:
|
||||
- ansible-runner
|
||||
{% endif %}
|
||||
custom_worksign_public_keyfile: receptor/work_public_key.pem
|
||||
custom_tls_certfile: receptor/tls/receptor.crt
|
||||
custom_tls_keyfile: receptor/tls/receptor.key
|
||||
@ -29,8 +33,6 @@ receptor_peers:
|
||||
protocol: tcp
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
additional_python_packages:
|
||||
- ansible-runner
|
||||
{% verbatim %}
|
||||
podman_user: "{{ receptor_user }}"
|
||||
podman_group: "{{ receptor_group }}"
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
shell: /bin/bash
|
||||
- import_role:
|
||||
name: ansible.receptor.setup
|
||||
{% endverbatim %}
|
||||
{% if instance.node_type == "execution" %}
|
||||
- import_role:
|
||||
name: ansible.receptor.podman
|
||||
{% endverbatim %}
|
||||
{% endif %}
|
||||
|
||||
@ -83,7 +83,7 @@ class InstanceInstallBundle(GenericAPIView):
|
||||
tar_addfile(cert_tarinfo, cert)
|
||||
|
||||
# generate and write install_receptor.yml to the tar file
|
||||
playbook = generate_playbook().encode('utf-8')
|
||||
playbook = generate_playbook(instance_obj).encode('utf-8')
|
||||
playbook_tarinfo = tarfile.TarInfo(f"{instance_obj.hostname}_install_bundle/install_receptor.yml")
|
||||
tar_addfile(playbook_tarinfo, playbook)
|
||||
|
||||
@ -109,8 +109,10 @@ class InstanceInstallBundle(GenericAPIView):
|
||||
return response
|
||||
|
||||
|
||||
def generate_playbook():
|
||||
return render_to_string("instance_install_bundle/install_receptor.yml")
|
||||
def generate_playbook(instance_obj):
|
||||
playbook_yaml = render_to_string("instance_install_bundle/install_receptor.yml", context=dict(instance=instance_obj))
|
||||
# convert consecutive newlines with a single newline
|
||||
return re.sub(r'\n+', '\n', playbook_yaml)
|
||||
|
||||
|
||||
def generate_requirements_yml():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user