--- - hosts: "{{ host }}" vars: tasks: - name: Add ssh pub keys authorized_key: user: "{{ user }}" key: "{{ key }}" state: present manage_dir: yes