ansible.builtin.local connection – execute on controller

Note

This connection plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name local. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.local for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same connection plugin name.

Synopsis

  • This connection plugin allows ansible to execute tasks on the Ansible ‘controller’ instead of on a remote host.

Aliases: redirected_local

Parameters

Parameter

Comments

become_strip_preamble

boolean

added in ansible-core 2.19

Strip internal become output preceding command execution. Disable for additional diagnostics.

Choices:

  • false

  • true ← (default)

Configuration:

  • Variable: ansible_local_become_strip_preamble

become_success_timeout

integer

added in ansible-core 2.19

Number of seconds to wait for become to succeed when enabled.

The default will be used if the configured value is less than 1.

Default: 10

Configuration:

  • Variable: ansible_local_become_success_timeout

pipelining

boolean

Pipelining reduces the number of connection operations required to execute a module on the remote server, by executing many Ansible modules without actual file transfers.

This can result in a very significant performance improvement when enabled.

However this can conflict with privilege escalation (become). For example, when using sudo operations you must first disable requiretty in the sudoers file for the target hosts, which is why this feature is disabled by default.

Choices:

  • false ← (default)

  • true

Configuration:

  • INI entries:

    [defaults]
    pipelining = false
    
    [connection]
    pipelining = false
    
  • Environment variable: ANSIBLE_PIPELINING

  • Variable: ansible_pipelining

Notes

Note

  • The remote user is ignored, the user with which the ansible CLI was executed is used instead.

Authors

  • ansible (@core)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.