diff --git a/defaults/main.yml b/defaults/main.yml index 267e6768..c91c9e6f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -179,3 +179,10 @@ openstack_ca_bundle_path: "{{ _openstack_ca_bundle_path }}" # extra configuration for OS package manager openstack_hosts_package_manager_extra_conf: '' + +# apt pins to apply to all hosts in the deployment +# the default is to make ceph packages from UCA lower priority than those from the ubuntu distro repo +openstack_hosts_apt_pinned_packages: + - package: "src:ceph" + origin: "ubuntu-cloud.archive.canonical.com" + priority: 400 \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml index d63a0062..8570a602 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -37,5 +37,7 @@ galaxy_info: - openstack dependencies: - role: apt_package_pinning + apt_pinned_packages: "{{ openstack_hosts_apt_pinned_packages }}" + apt_package_pinning_file_name: "openstack_hosts_pin.pref" when: - ansible_facts['pkg_mgr'] == 'apt' diff --git a/releasenotes/notes/global-apt-pins-a0d6785a8fd662df.yaml b/releasenotes/notes/global-apt-pins-a0d6785a8fd662df.yaml new file mode 100644 index 00000000..f79dfce0 --- /dev/null +++ b/releasenotes/notes/global-apt-pins-a0d6785a8fd662df.yaml @@ -0,0 +1,20 @@ +--- +features: + - | + A new variable `openstack_hosts_apt_pinned_packages` is added which allows + deployment wide apt pins to be defined in user_variables. The variable defaults + to pinning the UCA repository to a priority lower than the Ubuntu repositories for + any binary packages generated from the ceph source package. The intention is to + ensure that Ceph packages are always installed from the Ubuntu repositories, or + alternatively the official ceph repositories if the ceph_client role is run later + against a host. The ceph packages for a particular openstack release may not be the + same version as those expected by the rest of openstack-ansible so this change ensures + consistency in the deployed ceph version. +upgrade: + - | + The new variable `openstack_hosts_apt_pinned_packages` is added to the openstack_hosts + ansible role and sets the value of `apt_pinned_packages` for the apt_package_pinning + role run as a dependancy of the openstack_hosts role. Existing use of the + `apt_pinned_packages` variable by deployers in user_variables should be reviewed + to ensure that those pins are applied by the intended ansible roles, and swapped + to this new variable if necessary.