zuul-operator/playbooks/zuul-operator-functional/tasks/test_registry.yaml
Tristan Cacqueray 344a0b763b test: refactor run tasks to include file
This change move tasks to dedicated files to
improve the readability of the run playbooks.

Change-Id: Iaf4829daf5f89f22b200d089ef8fd4eeee3e91bf
2020-04-15 18:05:22 +00:00

22 lines
615 B
YAML

- name: Get registry service ip
command: kubectl get svc registry -o "jsonpath={.spec.clusterIP}"
register: _registry_ip
- name: Add registry to /etc/hosts
become: yes
lineinfile:
path: /etc/hosts
regexp: "^.* registry$"
line: "{{ _registry_ip.stdout_lines[0] }} registry"
- name: Get registry password
command: kubectl get secret zuul-registry-user-rw -o "jsonpath={.data.password}"
register: _registry_password
- name: Test registry login
command: >
podman login
--tls-verify=false registry:9000
-u zuul
-p "{{ _registry_password.stdout_lines[0] | b64decode }}"