--- - hosts: bastion gather_facts: false tasks: - name: Set authorized key taken from file ansible.posix.authorized_key: user: clusteruser state: present key: "{{ lookup('file', './files/ansible_key.pub') }}"