zuul-jobs/test-playbooks/registry/test-registry-pre.yaml
Mohammed Naser 1c95063442 cleanup: move tests to use ensure-package-repositories
In order to keep things clean, let's re-use the role we have
for setting up repos.

Change-Id: I989c4d45e28f94767ff9d63937d273d0542312f5
2020-05-01 15:49:30 +02:00

49 lines
1.4 KiB
YAML

# This happens in the pre-playbook of the opendev-buildset-registry
# job. Since we're testing these roles in opendev, we need to do the
# same here for the builder (and also the intermediate registry,
# though that obviously happens in configuration management rather
# than a job).
- hosts: builder:intermediate-registry
name: "Set up container system and iptables configuration for registry hosts"
tasks:
- name: Install container system
include_role:
name: "ensure-{{ container_command }}"
- name: Open the IPv4 port for the buildset registry
become: true
iptables:
action: insert
chain: openstack-INPUT
destination_port: '5000:5001'
jump: ACCEPT
match: tcp
ctstate: NEW
protocol: tcp
ip_version: ipv4
- name: Open the IPv6 port for the buildset registry
become: true
iptables:
action: insert
chain: openstack-INPUT
destination_port: '5000:5001'
jump: ACCEPT
match: tcp
ctstate: NEW
protocol: tcp
ip_version: ipv6
- hosts: executor
name: Set up a simulated executor
roles:
- name: ensure-package-repositories
repositories_list:
- repo: ppa:projectatomic/ppa
tasks:
- name: Install packages
become: true
package:
name:
- socat
- skopeo
state: present