# Within provisioning callback play/delegate to other host?

**URL:** <https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560>\
**Category:** Get Help\
**Tags:** infoblox, awx\
**Created:** [May 9, 2025, 8:37am UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560 "2025-05-09T08:37:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![baefisch](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/baefisch/32/8395_2.png) [@baefisch](https://forum.ansible.com/u/baefisch)\
**Post date:** [May 9, 2025, 8:37am UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/1 "2025-05-09T08:37:35Z")

</div>

AWX 17.1.0  
Ansible 2.9.18

using AWX and provisioning callbacks after satellite installation.

Now i try to modify an infoblox entry using the infoblox client integration for linux.

problem is, during the execution of the callback curl html header limits my play execution on AWX to the specific host. How to extend this limit in a provisioning callback? Or how to do tasks on a second host, which is not executing the callback itself, but part of the inventory?

for example.

Host: testhost.bla

```
satellite installation

executing curl': /usr/bin/curl -k -s --data "host_config_key=info" https://awx.bla/api/v2/job_templates/61/callback/

modify infoblox entry on infoblox.bla

```

TASK [delte an A record] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*fatal: [ltesthost.bla]: FAILED! =\> {“changed”: false, “msg”: “infoblox-client is required but does not appear to be installed. It can be installed using the command `pip install infoblox-client`”}

if i change my play to:

- name: infoblox Record change  
hosts: infoblox.bla  
gather\_facts: no  
vars:  
tasks:
  - name: delte an A record  
infoblox.nios\_modules.nios\_a\_record:

Get error:

PLAY [infoblox Record change] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*skipping: no hosts matched

because provisioning callback is not addressing my infoblox.bla

---

<div class="post-metadata">

**Author:** ![wayt](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@wayt](https://forum.ansible.com/u/wayt)\
**Post date:** [May 9, 2025, 3:51pm UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/2 "2025-05-09T15:51:01Z")

</div>

Set the hosts to all and delegate the task for infoblox. You won’t be able to adjust the callback limit. You could look at event driven ansible for more capabilities in handling webhooks as an alternative.

---

<div class="post-metadata">

**Author:** ![baefisch](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/baefisch/32/8395_2.png) [@baefisch](https://forum.ansible.com/u/baefisch)\
**Post date:** [May 12, 2025, 9:49am UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/3 "2025-05-12T09:49:09Z")

</div>

Already tried:

```auto
  - name: infoblox Record tauschen
    hosts: all # <-- Infoblox
   # connection: local
    gather_facts: no
    vars:
    tasks:
      - name: delte an A record
        infoblox.nios_modules.nios_a_record:
          name: "{{ hostvars[ansible_limit]['substringHostname']['msg'] }}"
          ipv4: "{{ hostvars[ansible_limit]['foreman']['ip'] }}"
          state: absent
          provider:
            host: infoblox.bla
            username: admin
            password: xy
            ssl_verify: no
        delegate_to: 127.0.0.1

```

→ error because of missing infoblox client in AWX Container.  
Because Infoblox Client has to be installed on AWX for connecting.

…  
delegate\_to: infoblox.bla  
…  
 → error. No matching host, because

```auto
executing curl': /usr/bin/curl -k -s --data "host_config_key=info" https://awx.bla/api/v2/job_templates/61/callback/

```

limits the whole thing to testhost.bla

or what do you mean?

---

<div class="post-metadata">

**Author:** ![wayt](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@wayt](https://forum.ansible.com/u/wayt)\
**Post date:** [May 12, 2025, 2:04pm UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/4 "2025-05-12T14:04:31Z")

</div>

Create an execution environment that includes the infoblox client ( `ansible-builder` ). Then you can `delegate_to` `localhost` and run the `infoblox.nios_modules.nios_a_record` module there while it is limited from the callback. Alternatively, you can just `delegate_to` the necessary calls to your infoblox host.

> hosts

```ini
host1
host2

[all:vars]
ansible_connection = ansible.builtin.local

```

> playbook.yml

```yml
---
- hosts: all

  tasks:
    - name: Delegate to a host not covered by the `--limit`
      ansible.builtin.debug:
        msg: This task has been delegated
      delegate_to: host2 

```

> command

```bash
ansible-playbook --inventory hosts --limit host1 playbook.yml

```

> results in

```bash
% ansible-playbook --inventory hosts playbook.yml --limit host1

PLAY [all] *************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************
ok: [host1]

TASK [ansible.builtin.debug] *******************************************************************************************
ok: [host1 -> host2] => {
    "msg": "I've been delegated"
}

PLAY RECAP *************************************************************************************************************
host1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0   

```

---

<div class="post-metadata">

**Author:** ![baefisch](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/baefisch/32/8395_2.png) [@baefisch](https://forum.ansible.com/u/baefisch)\
**Post date:** [May 13, 2025, 8:52am UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/5 "2025-05-13T08:52:09Z")

</div>

trying to delegate to infoblox is not working because this module opens a connection from a linux system to use infoblox api

```auto
        delegate_to: infoblox.bla

```

results in.

```auto
  "msg": "Failed to connect to the host via ssh: \n\nDisconnect NOW if you have not been expressly authorized to use this system.\nansibleuser@infoblox.bla: Permission denied (password).",

```

delegating to localhost or awx

```auto
        delegate_to: awx.bla

```

results in

```auto
{
  "msg": "infoblox-client is required but does not appear to be installed. It can be installed using the command `pip install infoblox-client`",
  "invocation": {
    "module_args": {
      "name": "test.bla",
      "ipv4": "xxxxxx",
      "state": "absent",
      "provider": {
        "host": "infoblox.bla",
        "username": "admin",
        "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
        "ssl_verify": false,
        "validate_certs": false,
        "silent_ssl_warnings": true,
        "http_request_timeout": 10,
        "http_pool_connections": 10,
        "http_pool_maxsize": 10,
        "max_retries": 3,
        "wapi_version": "2.12.3",
        "max_results": 1000,
        "cert": null,
        "key": null
      },
      "ipv4addr": "xxxx",
      "view": "default",
      "ttl": null,
      "extattrs": null,
      "comment": null
    }
  },
  "deprecations": [
    {
      "msg": "Distribution redhat 8.10 on host test.bla internal should use /usr/libexec/platform-python, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information",
      "version": "2.12"
    }
  ],
  "_ansible_no_log": false,
  "changed": false,
  "_ansible_delegated_vars": {
    "ansible_host": "AWX.bla",
    "ansible_port": null,
    "ansible_user": "xxx"
  }
}

```

because infoblox client is not installed inside awx container!

Maybe a “jumphost” would be the solution. Will give a try.

---

<div class="post-metadata">

**Author:** ![baefisch](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/baefisch/32/8395_2.png) [@baefisch](https://forum.ansible.com/u/baefisch)\
**Post date:** [May 13, 2025, 10:25am UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/6 "2025-05-13T10:25:54Z")

</div>

Jumphost was the deal. Installing the infoblox client on any other host.  
On AWX is not working because of some pip install dependency errors.

Thx for all. You showed me the right direction. !! TOP

---

<div class="post-metadata">

**Author:** ![wayt](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@wayt](https://forum.ansible.com/u/wayt)\
**Post date:** [May 13, 2025, 12:59pm UTC](https://forum.ansible.com/t/within-provisioning-callback-play-delegate-to-other-host/42560/7 "2025-05-13T12:59:58Z")

</div>

Are you running an older AWX that supports Python virtual environments or a newer version that supports execution environments?

Glad you found a resolution.
