Enable all in one build in openstack-infra
This commit implements changes in the all in one scripted build in order to make it work within openstack-infra: 1) flush all iptables rules put into place by openstack-infra 2) permit root login to sshd Change-Id: Ib7eba632034f276184bd58fe33e5cab7f1c63b76 Closes-Bug: 1399651
This commit is contained in:
parent
255f29bcaa
commit
e8068d15d1
@ -31,6 +31,24 @@ apt-get install -y python-dev \
|
||||
lvm2 \
|
||||
linux-image-extra-$(uname -r)
|
||||
|
||||
# Flush all the iptables rules set by openstack-infra
|
||||
iptables -F
|
||||
iptables -X
|
||||
iptables -t nat -F
|
||||
iptables -t nat -X
|
||||
iptables -t mangle -F
|
||||
iptables -t mangle -X
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P FORWARD ACCEPT
|
||||
iptables -P OUTPUT ACCEPT
|
||||
|
||||
# Ensure that sshd permits root login, or ansible won't be able to connect
|
||||
if grep "^PermitRootLogin" /etc/ssh/sshd_config > null; then
|
||||
sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
else
|
||||
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
|
||||
fi
|
||||
|
||||
function key_create(){
|
||||
ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user