ansible.builtin.exists (v2.16.5) — test

does the path exist, follow symlinks

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

Authors: Ansible Core

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Check if the provided path maps to an existing filesystem object on the controller (localhost).

Follows symlinks and checks the target of the symlink instead of the link itself, use the P(ansible.builtin.link#test) or P(ansible.builtin.link_exists#test) tests to check on the link.

Inputs

    
_input:
    description: a path
    type: path

Outputs

_value:
  description: Returns V(True) if the path corresponds to an existing filesystem object
    on the controller (after following symlinks), V(False) if otherwise.
  type: boolean