--- # Copyright 2017 Marc GariƩpy # # 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: Download EPEL gpg keys get_url: url: "{{ item.url }}" dest: "{{ item.key }}" mode: "0640" with_items: "{{ ceph_gpg_keys | selectattr('url', 'defined') }}" register: _get_yum_keys until: _get_yum_keys is success retries: 5 delay: 2 when: - ceph_pkg_source == 'ceph' - name: Copy Ceph gpg keyfile to the key location copy: src: "{{ item.src }}" dest: "{{ item.key }}" mode: "0640" with_items: "{{ ceph_gpg_keys | selectattr('src', 'defined') }}" when: - ceph_pkg_source == 'ceph' - name: Install Ceph gpg keys rpm_key: key: "{{ key['key'] }}" fingerprint: "{{ key['fingerprint'] | default(omit) }}" state: "{{ key['state'] | default('present') }}" with_items: "{{ ceph_gpg_keys }}" loop_control: loop_var: key register: _add_ceph_keys until: _add_ceph_keys is success retries: 5 delay: 2 - name: Install required repositories yum_repository: baseurl: "{{ item.baseurl }}" description: "{{ item.description | default(omit) }}" enabled: "{{ item.enabled | default(True) }}" file: "{{ item.file | default(omit) }}" includepkgs: "{{ item.includepkgs | default(omit) }}" gpgcheck: "{{ item.gpgcheck | default(omit) }}" gpgkey: "{{ item.gpgkey | default(omit) }}" name: "{{ item.name }}" priority: "{{ item.priority | default(omit) }}" state: "{{ item.state | default('present') }}" with_items: "{{ ceph_repos }}" register: install_repo until: install_repo is success retries: 5 delay: 2