zuul/playbooks/zuul-stream/2.7-container.yaml
Ian Wienand 78050adb51 zuul_stream : Use !127.0.0.1 for loopback
This is a follow-on to Ia78ad9e3ec51bc47bf68c9ff38c0fcd16ba2e728 to
use a different loopback address for the local connection to the
Python 2.7 container.  This way, we don't have to override the
existing localhost/127.0.0.1 matches that avoid the executor trying to
talk to a zuul_console daemon.  These bits are removed.

The comment around the port settings is updated while we're here.

Change-Id: I33b2198baba13ea348052e998b1a5a362c165479
2022-09-07 10:48:25 +10:00

22 lines
598 B
YAML

- name: Install docker
include_role:
name: ensure-docker
- name: Build 2.7 container environment
shell: |
pushd {{ ansible_user_dir }}/src/opendev.org/zuul/zuul/playbooks/zuul-stream/fixtures/
cat ~/.ssh/id_rsa.pub > authorized_keys
docker build -f Dockerfile.py27 -t zuul_python27 .
args:
executable: /bin/bash
- name: Run 2.7 container
shell: |
docker run -d -p 2022:22 -p 19887:19887 zuul_python27
docker ps
- name: Accept host keys
shell: |
ssh-keyscan -p 2022 localhost >> ~/.ssh/known_hosts
ssh-keyscan -p 2022 127.0.0.2 >> ~/.ssh/known_hosts