mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 21:44:31 +00:00
ansible_become_ask_pass in group_vars does not reliably trigger an
interactive sudo prompt for ansible_connection=local — Ansible cannot
prompt per-host mid-play. The fix is a wrapper script that passes
-K / --ask-become-pass before any play execution.
- infrastructure/bin/install_workstation.sh: auto-detects FQDN, adds
--ask-become-pass, passes extra args through. Run from repo root:
./infrastructure/bin/install_workstation.sh
make workstation
- Makefile: add 'workstation' target pointing to the script
- group_vars/workstations.yml: drop ansible_become_ask_pass (does not
work), keep ansible_pipelining=false (needed for SSH workstations
with sudo passwords — pipelining replaces stdin, breaking sudo -S)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
702 B
YAML
15 lines
702 B
YAML
# Workstation-specific Ansible connection overrides.
|
|
#
|
|
# Servers (k3s nodes, VMs) have pipelining=True in ansible.cfg for performance.
|
|
# Personal Macs/Linux workstations need pipelining disabled: pipelining replaces
|
|
# stdin with a pipe, which prevents sudo from prompting for a password
|
|
# (sudo -S reads the password from stdin; if that's a pipe, sudo sees EOF and
|
|
# falls back to "sudo: a password is required").
|
|
#
|
|
# Note: ansible_become_ask_pass in inventory does NOT reliably trigger an
|
|
# interactive terminal prompt for local connections. Use the wrapper script
|
|
# instead:
|
|
# ./infrastructure/bin/install_workstation.sh
|
|
# which adds --ask-become-pass (-K) automatically.
|
|
ansible_pipelining: false
|