- name: restart sshd freebsd
  when: 'os_flavor == "freebsd"'
  listen: restart sshd
  service:
    name: sshd
    state: reloaded

- name: restart ssh linux
  when: 'os_flavor == "linux"'
  listen: restart sshd
  systemd:
    state: reloaded
    name: sshd
    daemon_reload: yes
