diff --git a/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml b/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml index 8feabcb87..0f6f35aaa 100644 --- a/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml +++ b/roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml @@ -25,6 +25,14 @@ - ceph_rhcs - ceph_rhcs_iso_install +- name: set apt pinning for red hat ceph storage + template: + src: "{{ role_path }}/templates/rhcs.pref.j2" + dest: /etc/apt/preferences.d/rhcs.pref + owner: root + group: root + mode: 0644 + - name: add the red hat storage apt-key apt_key: data: "{{ lookup('file', role_path+'/files/cephstablerhcs.asc') }}" diff --git a/roles/ceph-common/templates/rhcs.pref.j2 b/roles/ceph-common/templates/rhcs.pref.j2 new file mode 100644 index 000000000..45abfbcae --- /dev/null +++ b/roles/ceph-common/templates/rhcs.pref.j2 @@ -0,0 +1,7 @@ +#jinja2: trim_blocks: "true", lstrip_blocks: "true" +# {{ ansible_managed }} + +Explanation: Prefer Red Hat packages +Package: * +Pin: release o=/Red Hat/ +Pin-Priority: 999