Learning to optimize my Ansible role to automatically populate the .ssh/config file based on my inventory has been beneficial. Managing the file remotely was very slow. I am switching to using ansible.builtin.slurp, ansible.builtin.set_fact, and ansible.builtin.copy.
Result: On the localhost, the time decreased from 20 seconds to 13 seconds. On a remote host, my script previously took over 2 minutes; now it runs in just under 20 seconds!
