mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
Do not install ansible-runner or podman on hop nodes
This commit is contained in:
@@ -4,12 +4,16 @@ receptor_group: awx
|
|||||||
receptor_verify: true
|
receptor_verify: true
|
||||||
receptor_tls: true
|
receptor_tls: true
|
||||||
receptor_mintls13: false
|
receptor_mintls13: false
|
||||||
|
{% if instance.node_type == "execution" %}
|
||||||
receptor_work_commands:
|
receptor_work_commands:
|
||||||
ansible-runner:
|
ansible-runner:
|
||||||
command: ansible-runner
|
command: ansible-runner
|
||||||
params: worker
|
params: worker
|
||||||
allowruntimeparams: true
|
allowruntimeparams: true
|
||||||
verifysignature: true
|
verifysignature: true
|
||||||
|
additional_python_packages:
|
||||||
|
- ansible-runner
|
||||||
|
{% endif %}
|
||||||
custom_worksign_public_keyfile: receptor/work_public_key.pem
|
custom_worksign_public_keyfile: receptor/work_public_key.pem
|
||||||
custom_tls_certfile: receptor/tls/receptor.crt
|
custom_tls_certfile: receptor/tls/receptor.crt
|
||||||
custom_tls_keyfile: receptor/tls/receptor.key
|
custom_tls_keyfile: receptor/tls/receptor.key
|
||||||
@@ -29,8 +33,6 @@ receptor_peers:
|
|||||||
protocol: tcp
|
protocol: tcp
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
additional_python_packages:
|
|
||||||
- ansible-runner
|
|
||||||
{% verbatim %}
|
{% verbatim %}
|
||||||
podman_user: "{{ receptor_user }}"
|
podman_user: "{{ receptor_user }}"
|
||||||
podman_group: "{{ receptor_group }}"
|
podman_group: "{{ receptor_group }}"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
- import_role:
|
- import_role:
|
||||||
name: ansible.receptor.setup
|
name: ansible.receptor.setup
|
||||||
|
{% endverbatim %}
|
||||||
|
{% if instance.node_type == "execution" %}
|
||||||
- import_role:
|
- import_role:
|
||||||
name: ansible.receptor.podman
|
name: ansible.receptor.podman
|
||||||
{% endverbatim %}
|
{% endif %}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class InstanceInstallBundle(GenericAPIView):
|
|||||||
tar_addfile(cert_tarinfo, cert)
|
tar_addfile(cert_tarinfo, cert)
|
||||||
|
|
||||||
# generate and write install_receptor.yml to the tar file
|
# 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")
|
playbook_tarinfo = tarfile.TarInfo(f"{instance_obj.hostname}_install_bundle/install_receptor.yml")
|
||||||
tar_addfile(playbook_tarinfo, playbook)
|
tar_addfile(playbook_tarinfo, playbook)
|
||||||
|
|
||||||
@@ -109,8 +109,10 @@ class InstanceInstallBundle(GenericAPIView):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def generate_playbook():
|
def generate_playbook(instance_obj):
|
||||||
return render_to_string("instance_install_bundle/install_receptor.yml")
|
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():
|
def generate_requirements_yml():
|
||||||
|
|||||||
Reference in New Issue
Block a user