Merge "Convert ssh keys for ruby net-ssh if necessary"
This commit is contained in:
commit
3c1869904b
3
playbooks/zuul/infra-puppet-beaker-rspec/pre.yaml
Normal file
3
playbooks/zuul/infra-puppet-beaker-rspec/pre.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- role: ensure-virtualenv
|
@ -15,7 +15,13 @@
|
|||||||
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
|
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
|
||||||
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
|
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
|
if [ -f ~/.ssh/id_rsa ] ; then
|
||||||
|
# A key already exists, we'll use it but ensure it is in pem
|
||||||
|
# format for ruby's net-ssh
|
||||||
|
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa -N '' -P ''
|
||||||
|
else
|
||||||
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P ""
|
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P ""
|
||||||
|
fi
|
||||||
sudo mkdir -p /root/.ssh
|
sudo mkdir -p /root/.ssh
|
||||||
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
|
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
|
||||||
if [ -f /usr/bin/yum ]; then
|
if [ -f /usr/bin/yum ]; then
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
description: |
|
description: |
|
||||||
Base job for beaker-rspec tests for Infra's puppet modules.
|
Base job for beaker-rspec tests for Infra's puppet modules.
|
||||||
nodeset: ubuntu-xenial
|
nodeset: ubuntu-xenial
|
||||||
|
pre-run: playbooks/zuul/infra-puppet-beaker-rspec/pre.yaml
|
||||||
run: playbooks/zuul/infra-puppet-beaker-rspec/run.yaml
|
run: playbooks/zuul/infra-puppet-beaker-rspec/run.yaml
|
||||||
vars:
|
vars:
|
||||||
nodeset: nodepool-xenial
|
nodeset: nodepool-xenial
|
||||||
|
Loading…
Reference in New Issue
Block a user