From 5a75cb621f2657d632a72a942afd8e4baa0cc6ce Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Mon, 8 Apr 2019 05:20:29 +0000 Subject: [PATCH] Use PEM format for paramiko ssh key --- ansible/roles/create_config/tasks/main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/create_config/tasks/main.yaml b/ansible/roles/create_config/tasks/main.yaml index f7b0090..bc63948 100644 --- a/ansible/roles/create_config/tasks/main.yaml +++ b/ansible/roles/create_config/tasks/main.yaml @@ -29,7 +29,7 @@ when: not zuul_ssh_key block: - name: Create ssh key - command: "ssh-keygen -f /opt/ansible/ssh-{{ zuul_cluster_name }} -t rsa -N '' -C zuul" + command: "ssh-keygen -f /opt/ansible/ssh-{{ zuul_cluster_name }} -m PEM -t rsa -N '' -C zuul" args: creates: "/opt/ansible/ssh-{{ zuul_cluster_name }}" @@ -47,7 +47,7 @@ namespace: "{{ namespace }}" type: Opaque stringData: - id_rsa: |- + id_rsa: | {{lookup('file', '/opt/ansible/ssh-' + zuul_cluster_name) }} - name: Create ssh pub secret @@ -64,7 +64,7 @@ namespace: "{{ namespace }}" type: Opaque stringData: - id_rsa.pub: |- + id_rsa.pub: | {{lookup('file', '/opt/ansible/ssh-' + zuul_cluster_name + '.pub') }} # TODO: cleanup key file from operator pod