pytoccaz.utils.binary_path (1.4.0) — lookup

Returns a system executable path on the Ansible controller

| "added in version" 1.3.0 of pytoccaz.utils"

Authors: Olivier Bernard (@pytoccaz)

Install collection

Install with ansible-galaxy collection install pytoccaz.utils:==1.4.0


Add to requirements.yml

  collections:
    - name: pytoccaz.utils
      version: 1.4.0

Description

Returns the absolute path of a system executable within the Ansible controller C($PATH)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Find python3 in PATH
  ansible.builtin.debug:
    var: lookup('pytoccaz.utils.binary_path', binary='python3')

Inputs

    
binary:
    description: The name of the executable to find.
    type: str

Outputs

_raw:
  description: A one-element list containing the path when the executable is found,
    else an empty string
  elements: str
  type: list