- name: Ensure .ssh directory file: path: /root/.ssh mode: 0700 state: directory - name: Write out ssh private key copy: content: '{{ root_rsa_key }}' mode: 0400 dest: /root/.ssh/id_rsa