32 lines
1.3 KiB
YAML
32 lines
1.3 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 ""
|
|
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/openstack/puppet-openstack-integration/copy_logs.sh" EXIT
|
|
./run_beaker_tests.sh
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|