Add CentOS support
Add ceph support for ceph repos. Change-Id: I677d890378e636813fbea34afe4e4656b4fc6282
This commit is contained in:
parent
6c90ffdc1c
commit
802af2fb32
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- CentOS7/RHEL support has been added to the ceph_client role.
|
||||
- Only Ceph repos are supported for now.
|
@ -13,9 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: ceph_install_apt.yml
|
||||
static: no
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
- include: "ceph_install_{{ ansible_pkg_mgr }}.yml"
|
||||
tags:
|
||||
- ceph-apt-packages
|
||||
- ceph-yum-packages
|
||||
|
31
tasks/ceph_install_yum.yml
Normal file
31
tasks/ceph_install_yum.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
# 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: Install ceph packages
|
||||
yum:
|
||||
name: '{{ item.1 }}'
|
||||
state: "{{ ceph_client_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_subelements:
|
||||
- "{{ ceph_components }}"
|
||||
- package
|
||||
when: inventory_hostname in groups[item.0.component]
|
||||
notify:
|
||||
- Restart os services
|
||||
tags:
|
||||
- ceph-yum-packages
|
@ -14,9 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: ceph_preinstall_apt.yml
|
||||
- include: "ceph_preinstall_{{ ansible_pkg_mgr }}.yml"
|
||||
static: no
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
tags:
|
||||
- ceph-apt-keys
|
||||
- ceph-rpm-keys
|
||||
- ceph-repos
|
||||
|
54
tasks/ceph_preinstall_yum.yml
Normal file
54
tasks/ceph_preinstall_yum.yml
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
# 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'
|
||||
tags:
|
||||
- ceph-rpm-keys
|
||||
|
||||
- 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
|
||||
gpgkey: "{{ ceph_gpg_keys }}"
|
||||
state: present
|
||||
tags:
|
||||
- ceph-repos
|
||||
|
||||
- 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
|
||||
gpgkey: "{{ ceph_gpg_keys }}"
|
||||
state: present
|
||||
tags:
|
||||
- ceph-repos
|
||||
|
@ -12,3 +12,12 @@
|
||||
# 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.
|
||||
|
||||
# Ceph GPG Keys
|
||||
ceph_gpg_keys:
|
||||
- key: 'https://download.ceph.com/keys/release.asc'
|
||||
|
||||
ceph_repo_url_region: "download" # see here for other mirros http://docs.ceph.com/docs/master/install/mirrors/
|
||||
ceph_yum_repo_url: "http://{{ ceph_repo_url_region }}.ceph.com/rpm-{{ ceph_stable_release }}/"
|
||||
|
||||
# TODO mgariepy: add CentOS SIG ceph repo.
|
||||
|
Loading…
Reference in New Issue
Block a user