To solve your DRY problem, you may not realize that you can generate target rules from built-in functions eval
and foreach
and a user-defined new-line macro. Think of it like a preprocessor step.
For example:
# This defines a new-line macro. It must have two blank lines.
define nl
endef
# Generate two rules for ansible playbooks:
$(eval $(foreach v,1 2,\
.PHONY : ansible.run-playbook$v $(nl)\
\
ansible.run-playbook$v : ensure-variables cleanup-residue | $$(ansible.venv)$(nl)\
ansible.run-playbook$v :;\
... $(nl)\
))
I winged it a bit for you, but hopefully I got it right, or at least right enough you get what I’m doing with this technique.
I used to use that approach, but found in the last several years more than half the web sites I use reject email addresses with “+” characters.
I even use several sites that used to take those addresses just fine now reject them. That made me wonder if some common JS package for parsing email addresses got changed.