--- - name: Ensure ssh directory exists file: path="{{ ssh_template_path }}" state="directory" mode=0600 owner=root group=root - name: Generate ssh-key command: ssh-keygen -t rsa -C "ands-ssh@ipe.kit.edu" -N "" -f "{{ ssh_template_path }}"/id_rsa creates="{{ ssh_template_path }}/id_rsa" - name: Create ssh secret command: oc -n "{{ openshift_namespace }}" secrets new ands-ssh id_rsa="{{ ssh_template_path }}"/id_rsa id_rsa_pub="{{ ssh_template_path }}/id_rsa.pub" - name: Ensure ssh secret key is removed file: path="{{ ssh_template_path }}/id_rsa" state=absent