--- - hosts: all gather_facts: no tasks: - name: Read SSH public key slurp: src=~/.ssh/id_rsa_do.pub register: public_key # debug: msg="{{ public_key['content'] | b64decode }}"