Where is the documentation for what `%(something)` expansions work in `ansible.cfg`?
Newer documentation of ANSIBLE_SSH_CONTROL_PATH (Google likes old versions for some reason) mentions %(directory)
and omits quite a few words about path length limit.
This is the location to save ssh’s ControlPath sockets, it uses ssh’s variable substitution. Since 2.3, if null, ansible will generate a unique hash. Use
%(directory)
s to indicate where to use the control dir path setting. Before 2.3 it defaulted tocontrol_path=%(directory)s/ansible-ssh-%%h-%%p-%%r
. Be aware that this setting is ignored if-o ControlPath
is set in ssh args.
ANSIBLE_SSH_CONTROL_PATH_DIR is next in the config definitions.
This sets the directory to use for ssh control path if the control path setting is null. Also, provides the
%(directory)
s variable for the control path setting.
Substitution is implemented with custom code in the ssh connection plugin, doing Python (not Jinja) string templating. ssh connection code is among the oldest in Ansible, this is a legacy pattern that never become popular.
In general, an Ansible plugin or module will list anything special about the value you can provide.