ansible.builtin.script (v2.16.5) — inventory

Executes an inventory script that returns JSON

| "added in version" 2.4 of ansible.builtin"

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

The source provided must be an executable that returns Ansible inventory JSON

The source must accept C(--list) and C(--host <hostname>) as arguments. C(--host) will only be used if no C(_meta) key is present. This is a performance optimization as the script would be called per host otherwise.

Inputs

    
always_show_stderr:
    default: true
    description: Toggle display of stderr even when script was successful
    env:
    - name: ANSIBLE_INVENTORY_PLUGIN_SCRIPT_STDERR
    ini:
    - key: always_show_stderr
      section: inventory_plugin_script
    type: boolean
    version_added: 2.5.1
    version_added_collection: ansible.builtin