summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
cd707f7)
Change-Id: I8b45e9be5e950445e49631e845ebe263ee365c55
--- /dev/null
+# injected by packer
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZt9Ge7X3ZT/bMnYRS/zaHrM94zp+dlWH5k4LdeCpMQu9PjI3VbOqCDgemaKgKVapKRpk6etu9+Sy+P4aWnRXZsAGHEmfSwcfVaRZ2LnEUKKwbvJ8SaaSopdhkfgNV5ztkh7E+3wHIEp+fsSIC/LRXGPvcbkfNlZko96Ihz4BW0ezaeF3ikINtHb9r/cV4zNONE5NJoNkjAAE7chAiaZ+tyca4Nonb8UsCWxHofjxWNAGsC9tyuIOYIBAdXQI8kpS7VarEHK2WyOmPxNPuJqy6yQ/MYpgkg1tY5x7XsKa/O0DNl5kdH3R3ECqQ7H+AHrL5UK0l87BFan6O9xJTpb0p jenkins
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArXQug0RDmcbEWKcVnTbffD8jAgzm/lVhwG+Qdlz6iZZwEyLSU4nq6ymo2ukG7xTC8yBv5T0rjTtjQollFPc6CcM4I8aPnr8adI3ajDEseI4k/9bjr8+YrnXzLEszsoeYqCEqXz8gm1tbV1MMtxN3w7IUEdekAslFeMpJ8fEzFj8Ii5IiIGVJtz2mKdhReJEmqkW0u0UBQbg8L8n4YLj2wuW4V6hkDS/p96DJeBXb/wgB4u2bRWRFB45wlHyuVImeLxlMJTvWc6G1U7B7s/mcBLFX2Fis8brvMZDMiNPaUwWfYIJN+m2wzHhx0SkeboO6Svvcn7qe2qzgnDMOEUVQjQ== fdegir
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDiCJoG0x+wVM4T8GWMTHZobCDqnrDGEkyprNHrpUGchExhYUwu7B33zbz6F/A3ScpycBgiRTc47q+W8UB+cvfpol8CuvgmF7qU2E+/pe37Uee3ZDdXsxSg5rDp2ZDY1404/m1EKCmVMzBq0292KInsS7nWu9WsgPCKdalsHEBrWgAU3ft7FJX+5ybjMqhMZ3eXs6MAC1+ppLR6JhBPRInW5s1dYNUsQMKzHZvVmVzwPsa7KZEOKfPF0IKZiGCFsWzoLiRY60tmL0r/C1HXigUuHj0vITBePKx/YV06VLbzUffH+Lpa1asA5Rm27BcQ4ucIYucdv9x/+cnum8yoxHsAmgK+PvnqPk0qa7vRqcs7crTxgNyk3fRhttg4Sq+m1o4NQncfQW+JJNO7c8gPxawZ63onPMPUnAE3WNxu8N1Z2UPtMoAwicIyldggpt8oxmjC7B3OoxM2IwmoRNvW4x2Bq/VVjALFg9pRsoIrTp4040zhKaQLIkmaTnneE85ZsTTUcOJv66odf4e9gKcHA7J0BzwYNOuwlWmDnlqC7vQmyDc7N2FoFOBYVUem4KdTvNsBG/gFpglA7NRqD0REcfNMMdxi9pltW7gbowhBD5L0rBqXDYlROhBg3jWuwTvKOmcRrCROgS0zlZxLqO7vK3c39XMpuZdsOCP2OrQORoxFaw== Robert-Nordix-City-ssh
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuEIMUpo5XvG4ZI7R7EJCikN3bDD9fbYsohyvDsOLseyfBtCauK01KELDc0H+H9j2m+icBUGBmHoQeOpVFKE0jW6Y/3qDTl5UoYV9708BMCtj9j0N7CrwrBwkLbIVIWGkf0jC5HEip9/04PE/4GSiB2ORim6I1RjOiASB52FCO+J4rc6LiQbFL+RRiimcRajwuWR4msLpr+c/S2u3mnbSnityQJc0wCR/xZWS5poOuvF4oJ5vx3Vr8RspKxyN4ooLQYXEjVjWxYb7U3PUZ7Gbiu5hiMwm+X9qyit9RmE5f27vNoqssdSdfHQ5K84txbcfRDQ19bMO2gRA+IA0xEVgZ root@esy52-afrelalto-nfs
sudo bash -c 'cat << EOF > /var/lib/cloud/scripts/per-instance/copykeystojenkins.sh
#!/bin/bash
sudo mkdir -p /home/jenkins/.ssh
sudo bash -c 'cat << EOF > /var/lib/cloud/scripts/per-instance/copykeystojenkins.sh
#!/bin/bash
sudo mkdir -p /home/jenkins/.ssh
+# append ssh key injected by openstack to authorized_keys
sudo cat /home/ubuntu/.ssh/authorized_keys >> /home/jenkins/.ssh/authorized_keys
sudo cat /home/ubuntu/.ssh/authorized_keys >> /home/jenkins/.ssh/authorized_keys
+# append user ssh public keys uploaded by packer to authorized_keys
+sudo cat /home/ubuntu/authorized_keys.packer >> /home/jenkins/.ssh/authorized_keys
+# remove /home/ubuntu/authorized_keys.packer
+sudo rm -f /home/jenkins/authorized_keys.packer
sudo chown -R jenkins:jenkins /home/jenkins/.ssh
sudo chmod -R go-rwx /home/jenkins/.ssh
sudo userdel -f -r ubuntu
EOF'
sudo chown -R jenkins:jenkins /home/jenkins/.ssh
sudo chmod -R go-rwx /home/jenkins/.ssh
sudo userdel -f -r ubuntu
EOF'
sudo chmod +x /var/lib/cloud/scripts/per-instance/copykeystojenkins.sh
# vim: set ts=2 sw=2 expandtab:
sudo chmod +x /var/lib/cloud/scripts/per-instance/copykeystojenkins.sh
# vim: set ts=2 sw=2 expandtab:
- "script": "configure-image.sh",
+ "type": "file",
+ "source": "authorized_keys",
+ "destination": "/home/ubuntu/authorized_keys.packer"
+ },
+ {
+ "script": "configure-image-ubuntu1804.sh",