--- # General setup for my hosts - name: Install common packages apt: name={{ item }} state=present with_items: - htop - mtr - ntp - strace - tcpdump - vim - name: Setup SSH access authorized_key: user=root exclusive=yes key="{{ lookup('file', 'authorized_keys') }}" - name: Require Key for Login lineinfile: dest=/etc/ssh/sshd_config regexp=PasswordAuthentication line="PasswordAuthentication no" notify: restart ssh