diff --git a/roles/ceph-docker-common/tasks/main.yml b/roles/ceph-docker-common/tasks/main.yml index 48fc3a56c..20e7d0ea6 100644 --- a/roles/ceph-docker-common/tasks/main.yml +++ b/roles/ceph-docker-common/tasks/main.yml @@ -12,6 +12,8 @@ - name: set_fact is_atomic set_fact: is_atomic: '{{ stat_ostree.stat.exists }}' + tags: + - always - name: include pre_requisites/prerequisites.yml include: pre_requisites/prerequisites.yml @@ -88,6 +90,8 @@ - name: include fetch_image.yml include: fetch_image.yml + tags: + - fetch_container_image - name: get ceph version command: docker run --entrypoint /usr/bin/ceph {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} --version diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 2a9b12cc3..548ea20a1 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -13,16 +13,44 @@ - clients - iscsigws - mgrs - gather_facts: false - - tasks: + become: True + pre_tasks: - name: gather and delegate facts setup: delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] }}" + - name: check if it is atomic host + stat: + path: /run/ostree-booted + register: stat_ostree + tags: + - always + + - name: set_fact is_atomic + set_fact: + atomic: '{{ stat_ostree.stat.exists }}' + tags: + - always + + roles: + - { role: ceph-defaults, + tags: [with_pkg, fetch_container_image], + when: "(containerized_deployment | bool) and not (atomic | bool)" } + - { role: ceph-docker-common, + tags: [with_pkg, fetch_container_image], + when: "(containerized_deployment | bool) and not (atomic | bool)" } + + post_tasks: + - name: "pull {{ ceph_docker_image }} image" + command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}" + changed_when: false + when: + - atomic + - (ceph_docker_dev_image is undefined or not ceph_docker_dev_image) + - hosts: mons become: True gather_facts: false diff --git a/tests/functional/centos/7/docker/hosts b/tests/functional/centos/7/docker/hosts index 4696f238f..dcb2c123c 100644 --- a/tests/functional/centos/7/docker/hosts +++ b/tests/functional/centos/7/docker/hosts @@ -19,7 +19,7 @@ rgw0 nfs0 [clients] -client0 ceph_origin="repository" ceph_repository="community" +client0 [rbdmirrors] rbd-mirror0 diff --git a/tests/functional/centos/7/docker/vagrant_variables.yml b/tests/functional/centos/7/docker/vagrant_variables.yml index b7ae798c2..eb32bb5c0 100644 --- a/tests/functional/centos/7/docker/vagrant_variables.yml +++ b/tests/functional/centos/7/docker/vagrant_variables.yml @@ -46,7 +46,7 @@ disks: "[ '/dev/sda', '/dev/sdb' ]" # - https://atlas.hashicorp.com/boxes/search?utf8=✓&sort=&provider=virtualbox&q= # - https://download.gluster.org/pub/gluster/purpleidea/vagrant/ vagrant_box: centos/atomic-host -client_vagrant_box: centos/7 +#client_vagrant_box: centos/7 #ssh_private_key_path: "~/.ssh/id_rsa" # The sync directory changes based on vagrant box # Set to /home/vagrant/sync for Centos/7, /home/{ user }/vagrant for openstack and defaults to /vagrant