Merge pull request #858 from dang/custom-repo

Add a custom yum repo ability
pull/871/head
Leseb 2016-07-06 15:30:49 +02:00 committed by GitHub
commit e52d5b2357
6 changed files with 65 additions and 18 deletions

View File

@ -44,7 +44,7 @@ dummy:
# is not needed for versions after infernalis.
#use_server_package_split: true
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_stable_uca OR ceph_dev /!\
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
#debian_package_dependencies:
# - python-pycurl
@ -175,6 +175,15 @@ dummy:
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
#ceph_dev_redhat_distro: centos7
# CUSTOM
# ###
# Use a custom repository to install ceph. For RPM, ceph_custom_repo should be
# a URL to the .repo file to be installed on the targets. For deb,
# ceph_custom_repo should be the URL to the repo base.
#ceph_custom: false # use custom ceph repository
#ceph_custom_repo: https://server.domain.com/ceph-custom-repo
######################
# CEPH CONFIGURATION #

View File

@ -27,6 +27,7 @@ Have a look at `defaults/main.yml`.
* `ceph_dev`
* `ceph_stable_ice`
* `ceph_stable_rh_storage`
* `ceph_custom`
* `journal_size`
* `monitor_interface`
* `public_network`

View File

@ -36,7 +36,7 @@ upgrade_ceph_packages: False
# is not needed for versions after infernalis.
use_server_package_split: true
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_stable_uca OR ceph_dev /!\
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_stable_uca OR ceph_dev OR ceph_custom /!\
debian_package_dependencies:
- python-pycurl
@ -167,6 +167,15 @@ ceph_dev_branch: master # development branch you would like to use e.g: master,
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
ceph_dev_redhat_distro: centos7
# CUSTOM
# ###
# Use a custom repository to install ceph. For RPM, ceph_custom_repo should be
# a URL to the .repo file to be installed on the targets. For deb,
# ceph_custom_repo should be the URL to the repo base.
ceph_custom: false # use custom ceph repository
ceph_custom_repo: https://server.domain.com/ceph-custom-repo
######################
# CEPH CONFIGURATION #

View File

@ -49,3 +49,11 @@
state: present
changed_when: false
when: ceph_stable_uca
- name: add custom repo
apt_repository:
repo: "deb {{ ceph_custom_repo }} {{ ansible_lsb.codename }} main"
state: present
changed_when: false
when: ceph_custom

View File

@ -55,6 +55,7 @@
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_dev
or ceph_origin == "distro"
or ceph_custom
- name: install distro or red hat storage ceph mon
dnf:
@ -66,6 +67,7 @@
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph osd
yum:
@ -77,6 +79,7 @@
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph osd
dnf:
@ -88,46 +91,55 @@
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph mds
yum:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
(ceph_origin == "distro" or ceph_dev or
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
mds_group_name in group_names and
ansible_pkg_mgr == "yum"
- mds_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph mds
dnf:
name: "ceph-mds"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
(ceph_origin == "distro" or ceph_dev or
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
mds_group_name in group_names and
ansible_pkg_mgr == "dnf"
- mds_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph base
yum:
name: "ceph-base"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
(ceph_origin == "distro" or ceph_dev or
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
client_group_name in group_names and
ansible_pkg_mgr == "yum"
- client_group_name in group_names
- ansible_pkg_mgr == "yum"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install distro or red hat storage ceph base
dnf:
name: "ceph-base"
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
(ceph_origin == "distro" or ceph_dev or
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
client_group_name in group_names and
ansible_pkg_mgr == "dnf"
- client_group_name in group_names
- ansible_pkg_mgr == "dnf"
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
or ceph_origin == "distro"
or ceph_dev
or ceph_custom
- name: install ceph-test
yum:

View File

@ -57,3 +57,11 @@
group: root
mode: 0644
when: ceph_stable_ice
- name: add custom repo
get_url:
url: "{{ ceph_custom_repo }}"
dest: /etc/yum.repos.d
owner: root
group: root
when: ceph_custom