Ansible: Reset SSH Connection
Posted on
Sometimes when performing actions on a server, you might have to log out and log in again to have the changes applied. An example would be when adding a user to a group (to, for instance, allow sudo usage).
If you're using Ansible and want to achieve this, here's a way to do it:
- name: Reset SSH connection
  ansible.builtin.meta:
    reset_connection