ansible.builtin.quote (v2.16.0) — filter

shell quoting

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

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

Quote a string to safely use as in a POSIX shell.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Run a shell command
  shell: echo {{ string_value | quote }}

Inputs

    
_input:
    description: String to quote.
    required: true
    type: str

Outputs

_value:
  description: Quoted string.
  type: str