zuul-registry/playbooks/functional-test/cleanup.yaml
James E. Blair f99d2ffad3 Add podman buildset test
This tests the registry in a namespaced buildset configuration with
podman.

Change-Id: I17c2ac3ba3c733ace05ce0103dc6cf431fbf197e
2019-10-10 16:49:37 -07:00

44 lines
1.4 KiB
YAML

- name: Restore docker daemon configuration
when: daemon_config_stat.stat.exists
command: "cp {{ workspace }}/docker-daemon.json /etc/docker/daemon.json"
become: true
- name: Remove docker daemon configuration
when: not daemon_config_stat.stat.exists
command: "rm /etc/docker/daemon.json"
become: true
- name: Restart docker daemon
service:
name: docker
state: restarted
become: true
register: docker_restart
failed_when: docker_restart is failed and not 'Could not find the requested service' in docker_restart.msg
- name: Restore docker user configuration
when: user_config_stat.stat.exists
command: "cp {{ workspace }}/docker-user.json ~/.docker/config.json"
- name: Remove docker user configuration
when: not user_config_stat.stat.exists
command: "rm ~/.docker/config.json"
- name: Restore registries.conf
when: registries_conf_stat.stat.exists
command: "cp {{ workspace }}/registries.conf /etc/containers/registries.conf"
become: true
- name: Remove registries.conf
when: not registries_conf_stat.stat.exists
command: "rm /etc/containers/registries.conf"
become: true
- name: Restore containers user auth
when: containers_auth_stat.stat.exists
command: "cp {{ workspace }}/containers-auth.json /run/user/{{ ansible_user_uid }}/auth.json"
- name: Remove containers user auth
when: not containers_auth_stat.stat.exists
command: "rm /run/user/{{ ansible_user_uid }}/auth.json"