site-container: update container-engine role

Since the split between container-engine and container-common roles,
the tags and condition were not updated to reflect the change.

- ceph-container-engine needs with_pkg tag
- ceph-container-common needs fetch_container_images
- we don't need to pull the container image in a dedicated task for
atomic host. We can now use the ceph-container-common role.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
pull/4031/head
Dimitri Savineau 2019-05-28 16:43:48 -04:00 committed by Guillaume Abrioux
parent 616c484698
commit 2d375e1aa7
1 changed files with 3 additions and 17 deletions

View File

@ -71,25 +71,11 @@
name: ceph-handler
- import_role:
name: ceph-container-engine
tags: with_pkg
- import_role:
name: ceph-container-common
tags: [with_pkg, fetch_container_image]
when:
- not (is_atomic | bool)
- (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
# post-tasks for upcoming import -
- name: "pull {{ ceph_docker_image }} image"
command: "{{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
register: container_pull
until: container_pull.rc == 0
retries: 5
delay: 5
changed_when: false
when:
- is_atomic
- (ceph_docker_dev_image is undefined or not ceph_docker_dev_image)
- (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
tags: fetch_container_image
when: not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first)
- hosts: mons
any_errors_fatal: true