]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Omit the apt default_release if it is not needed 1870/head
authorLogan V <logan2211@gmail.com>
Thu, 7 Sep 2017 16:50:57 +0000 (11:50 -0500)
committerLogan V <logan2211@gmail.com>
Thu, 7 Sep 2017 16:50:57 +0000 (11:50 -0500)
The apt module will fail to downgrade packages properly when defualt
release is unnecessarily defined.

Closes #1869

roles/ceph-common/tasks/installs/install_debian_packages.yml

index 9797aaf702bc1459aebae5ee410422f0c8675350..62f266bb07a0d8083da5ed116038e248d50aed62 100644 (file)
@@ -4,19 +4,19 @@
     name: "ceph"
     update_cache: no
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
 
 - name: install ceph-common for debian
   apt:
     name: ceph-common
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
 
 - name: install ceph-test for debian
   apt:
     name: ceph-test
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
   when:
     - ceph_test
 
@@ -32,7 +32,7 @@
   apt:
     name: ceph-mds
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
   when:
     - mds_group_name in group_names
 
@@ -56,7 +56,7 @@
   apt:
     name: ceph-mgr
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
-    default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
+    default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
   when:
     - mgr_group_name in group_names
     - ceph_release_num.{{ ceph_release }} > ceph_release_num.jewel