25bff52a31
Change-Id: I5acda250e2c134918d8c22e8b010e20cfc3f9b33
37 lines
1.5 KiB
YAML
37 lines
1.5 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- shell:
|
|
cmd: |
|
|
echo "" | sudo tee -a /etc/ssh/sshd_config
|
|
echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
|
|
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
|
|
echo "" | 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
|
|
mkdir -p .ssh
|
|
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM <<<y
|
|
sudo mkdir -p /root/.ssh
|
|
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
|
|
if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then
|
|
sudo systemctl reload sshd
|
|
elif [ -f /usr/bin/apt-get ]; then
|
|
sudo service ssh restart
|
|
fi
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
trap "{{ ansible_user_dir }}/workspace/puppet-openstack-integration/copy_logs.sh" EXIT
|
|
if [ "{{ puppet_gem_version }}" != "latest" ]; then
|
|
export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}'
|
|
fi
|
|
export BEAKER_PUPPET_COLLECTION=puppet5
|
|
export BEAKER_set=nodepool-{{ nodepool_type }}
|
|
./run_beaker_tests.sh
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|