Quay HA Integration Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- when: inventory_hostname == groups['local'][0] | |
become: yes | |
block: | |
- name: Before - Create CA | |
block: | |
- name: Create CA Folder | |
file: | |
path: "/etc/docker/certs.d/{{ groups['quay'][0] }}" | |
state: directory | |
- name: Copy CA to Localhost Folder | |
copy: | |
src: "{{ quay_ca_files }}" | |
dest: "/etc/docker/certs.d/{{ groups['quay'][0] }}/ca.crt" | |
- name: Describe | |
block: | |
- name: It should login to local Quay Registry | |
command: "podman login -u={{ quay_test_robot_name }} -p={{ quay_test_robot_password }} {{ groups['quay'][0] }}" | |
register: callback | |
environment: | |
GODEBUG: x509ignoreCN=0 | |
- name: debug | |
debug: | |
msg: "{{ callback.stdout_lines[0] }}" | |
- name: Assert that it has logged in to local Quay Registry | |
vars: | |
test_string: "Login Succeeded!" | |
assert: | |
that: test_string == callback.stdout_lines[0] | |
- name: After - Delete CA from Localhost | |
file: | |
path: "/etc/docker/certs.d/{{ groups['quay'][0] }}/ca.crt" | |
state: absent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment