community / community.docker / 3.5.0 / connection / nsenter execute on host running controller container | "added in version" 1.9.0 of community.docker" Authors: Jeff Goldschrafe (@jgoldschrafe)community.docker.nsenter (3.5.0) — connection
Install with ansible-galaxy collection install community.docker:==3.5.0
collections: - name: community.docker version: 3.5.0
This connection plugin allows Ansible, running in a privileged container, to execute tasks on the container host instead of in the container itself.
This is useful for running Ansible in a pull model, while still keeping the Ansible control node containerized.
It relies on having privileged access to run C(nsenter) in the host's PID namespace, allowing it to enter the namespaces of the provided PID (default PID 1, or init/systemd).
nsenter_pid: default: 1 description: - PID to attach with using nsenter. - The default should be fine unless you are attaching as a non-root user. env: - name: ANSIBLE_NSENTER_PID ini: - key: nsenter_pid section: nsenter_connection type: int vars: - name: ansible_nsenter_pid