On 17/09/2019 14:14, Alfredo Deza wrote:
* Impossible to 'pin' to a version. User
installs 14.2.0 and 4 months
later they add other nodes but version moved to 14.2.2
I dynamically generate a pin for the ceph .deb files in ansible using
the tasks below. IIRC the ceph-deploy package doesn't follow the same
versioning but I'm not using that tool. Hope others might find this useful.
James
- name: "get ceph Package list"
set_fact:
ceph_version: "14.2.3*"
ceph_packages: "{{ lookup('url',
'http://download.ceph.com/debian-nautilus/dists/bionic/main/binary-amd64/Packages',
wantlist=True) | select('match', '^Package: *') | sort | list }}"
run_once: yes
- name: "generate apt pin for ceph"
template:
src: "{{ playbook_dir }}/tasks/apt-ceph-pin.j2"
dest: /etc/apt/preferences.d/ceph
mode: 0644
owner: root
group: root
The template is:
{% for pin in ceph_packages %}
{{ pin }}
Pin: version {{ ceph_version }}
Pin-Priority: 1001
{% endfor %}
Zynstra is a private limited company registered in England and Wales (registered number
07864369). Our registered office and Headquarters are at The Innovation Centre, Broad
Quay, Bath, BA1 1UD. This email, its contents and any attachments are confidential. If you
have received this message in error please delete it from your system and advise the
sender immediately.