]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: add github.com host key on slaves 177/head
authorKen Dreyer <kdreyer@redhat.com>
Wed, 28 Oct 2015 16:55:26 +0000 (10:55 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Thu, 5 Nov 2015 21:39:00 +0000 (14:39 -0700)
This prevents "Host key verification failed" errors when operating with
GitHub over SSH.

ansible/files/ssh/hostkeys/github.com.pub [new file with mode: 0644]
ansible/slave.yml
ansible/slave.yml.j2

diff --git a/ansible/files/ssh/hostkeys/github.com.pub b/ansible/files/ssh/hostkeys/github.com.pub
new file mode 100644 (file)
index 0000000..1bae52b
--- /dev/null
@@ -0,0 +1 @@
+github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
index 6f4df684189cfbbbb5ee8ef653ae9391b6312c22..9917a33b3dec76041c2754b1cecae98c7113425f 100644 (file)
         # docs.ceph.com.pub is the output of `ssh-keyscan docs.ceph.com`
         key: "{{ lookup('file', 'ssh/hostkeys/docs.ceph.com.pub') }}"
 
+    - name: add github.com host key
+      sudo: true
+      known_hosts:
+        path: '/etc/ssh/ssh_known_hosts'
+        name: 'github.com'
+        # github.com.pub is the output of `ssh-keyscan github.com`
+        key: "{{ lookup('file', 'ssh/hostkeys/github.com.pub') }}"
+
     - name: register the new slave to jenkins master
       jenkins-node:
         username: "{{ api_user }}"
index 49682c4cb6d96f55861eeccc0d2bdacb044f724a..629a0bfccba7846638028fae1de820cf0884cbcd 100644 (file)
       # docs.ceph.com.pub is the output of `ssh-keyscan docs.ceph.com`
       key="{{ lookup('file', 'ssh/hostkeys/docs.ceph.com.pub') }}"
 
+    - name: add github.com host key
+      sudo: true
+      known_hosts:
+        path: '/etc/ssh/ssh_known_hosts'
+        name: 'github.com'
+        # github.com.pub is the output of `ssh-keyscan github.com`
+        key: "{{ lookup('file', 'ssh/hostkeys/github.com.pub') }}"
+
     - name: register the new slave to jenkins master
       jenkins-node:
         username: "{{ api_user }}"