]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
defaults: declare container_binary
authorSébastien Han <seb@redhat.com>
Tue, 20 Nov 2018 21:29:53 +0000 (22:29 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 27 Nov 2018 16:47:40 +0000 (16:47 +0000)
Always declare container_binary and assign it a correct value.

Signed-off-by: Sébastien Han <seb@redhat.com>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
infrastructure-playbooks/rolling_update.yml
roles/ceph-defaults/defaults/main.yml
roles/ceph-defaults/tasks/facts.yml
site-container.yml.sample

index bd57d872dd5bd2d5773b1a075753a7fa7e822a88..0e4f91c116c1f485d11c06788e4342ffffee96cf 100644 (file)
@@ -543,6 +543,8 @@ dummy:
 #ceph_docker_enable_centos_extra_repo: false
 #ceph_docker_on_openstack: false
 #containerized_deployment: False
+#container_binary:
+
 
 ############
 # KV store #
index 211803c0d368bc32e135bfdb04ea7bda9040bc80..a3135090a14222d699bb0b233cf4f3c47b7b5dfa 100644 (file)
@@ -543,6 +543,8 @@ ceph_docker_registry: "registry.access.redhat.com/rhceph/"
 #ceph_docker_enable_centos_extra_repo: false
 #ceph_docker_on_openstack: false
 #containerized_deployment: False
+#container_binary:
+
 
 ############
 # KV store #
index 3d417c8620e86e0bd6b22130e3a20a454ae51e50..9469b94970c08365d71c7e66fd12dcf75dc2e705 100644 (file)
   serial: 1
   become: True
   tasks:
+    - import_role:
+        name: ceph-defaults
+        private: false
+
     - name: non container - get current fsid
       command: "ceph --cluster {{ cluster }} fsid"
       register: cluster_uuid_non_container
index 83cf9698f7789de59441089408162bc79934104d..68967a8393c53744ce70f3551588f29890df01b5 100644 (file)
@@ -535,6 +535,8 @@ ceph_client_docker_registry: "{{ ceph_docker_registry }}"
 ceph_docker_enable_centos_extra_repo: false
 ceph_docker_on_openstack: false
 containerized_deployment: False
+container_binary:
+
 
 ############
 # KV store #
index d5912202dcb7209936aa6679dc7b7d1572872b02..c2e905f0c4d150cf6d3a63df282340939f7f8d59 100644 (file)
 - name: set_fact is_podman
   set_fact:
     is_podman: "{{ podman_binary.stat.exists }}"
-  when:
-    - is_atomic
-    - ansible_distribution == 'Fedora'
 
 - name: set_fact container_binary
   set_fact:
-    container_binary: "{{ 'podman' if is_atomic and is_podman else 'docker' }}"
+    container_binary: "{{ 'podman' if is_atomic and is_podman and ansible_distribution == 'Fedora' else 'docker' }}"
   when: containerized_deployment
 
 - name: set_fact monitor_name ansible_hostname
index 0f4cf9d08c66d4ac6eecc989702af730d93c3d6c..1b4f27d7054a968f83d38e60613dcaeb4f8f8992 100644 (file)
@@ -57,7 +57,7 @@
 
     - name: set_fact container_binary
       set_fact:
-        container_binary: "{{ 'podman' if podman_binary.stat.exists else 'docker' }}"
+        container_binary: "{{ 'podman' if podman_binary.stat.exists and ansible_distribution == 'Fedora' else 'docker' }}"
 
     - import_role:
         name: ceph-defaults
 
     - name: get ceph status from the first monitor
       command: >
-        {{ 'podman' if podman_binary.stat.exists else 'docker' }} exec ceph-mon-{{ hostvars[groups['mons'][0]]['ansible_hostname'] }} ceph --cluster {{ cluster | default ('ceph') }} -s
+        {{ 'podman' if podman_binary.stat.exists and ansible_distribution == 'Fedora' else 'docker' }} exec ceph-mon-{{ hostvars[groups['mons'][0]]['ansible_hostname'] }} ceph --cluster {{ cluster | default ('ceph') }} -s
       register: ceph_status
       changed_when: false
       delegate_to: "{{ groups['mons'][0] }}"