- name: SSHD config Setup
  become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
  block:
    - name: Reconfigure sshd
      ansible.builtin.replace:
        path: /etc/ssh/sshd_config
        regexp: "^PermitRootLogin"
        replace: "#PermitRootLogin"
    - name: Restart ssh service
      ansible.builtin.service:
        name: ssh
        state: restarted
        daemon_reload: true
        enabled: true
