openstack-ansible-ceph_client/tasks/ceph_preinstall_yum.yml

51 lines
1.3 KiB
YAML

---
# Copyright 2017 Marc Gariépy <gariepy.marc@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Add ceph rpm key
rpm_key:
key: "{{ ceph_gpg_keys }}"
state: "present"
register: add_keys
until: add_keys|success
failed_when: false
retries: 5
delay: 2
when:
- ceph_pkg_source == 'ceph'
- name: Add ceph repo
yum_repository:
name: ceph
description: "Ceph packages for $basearch"
file: ceph
baseurl: "{{ceph_yum_repo_url}}/$basearch"
gpgcheck: yes
enabled: yes
priority: 50
gpgkey: "{{ ceph_gpg_keys }}"
state: present
- name: Add ceph noarch repo
yum_repository:
name: ceph-noarch
description: "Ceph noarch packages"
file: ceph
baseurl: "{{ceph_yum_repo_url}}/noarch"
gpgcheck: yes
enabled: yes
priority: 50
gpgkey: "{{ ceph_gpg_keys }}"
state: present