- name: Install useful software apt: name: "{{ packages }}" state: present - name: Manage root authorized_keys template: src: authorized_keys.j2 dest: /root/.ssh/authorized_keys when: authorized_keys is defined