mirror of https://github.com/ceph/ceph-ansible.git
Add a custom repo ability
Add the ability to use a custom repo, rather than just upstream, RHEL, and distro. This allows ansible to be used for internal testing. Signed-off-by: Daniel Gryniewicz <dang@redhat.com>pull/858/head
parent
b9db42f33e
commit
a7d999b45b
|
@ -43,7 +43,7 @@ dummy:
|
||||||
# is not needed for versions after infernalis.
|
# is not needed for versions after infernalis.
|
||||||
#use_server_package_split: true
|
#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:
|
#debian_package_dependencies:
|
||||||
# - python-pycurl
|
# - python-pycurl
|
||||||
|
@ -174,6 +174,15 @@ dummy:
|
||||||
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
|
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
|
||||||
#ceph_dev_redhat_distro: centos7
|
#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 #
|
# CEPH CONFIGURATION #
|
||||||
|
|
|
@ -27,6 +27,7 @@ Have a look at `defaults/main.yml`.
|
||||||
* `ceph_dev`
|
* `ceph_dev`
|
||||||
* `ceph_stable_ice`
|
* `ceph_stable_ice`
|
||||||
* `ceph_stable_rh_storage`
|
* `ceph_stable_rh_storage`
|
||||||
|
* `ceph_custom`
|
||||||
* `journal_size`
|
* `journal_size`
|
||||||
* `monitor_interface`
|
* `monitor_interface`
|
||||||
* `public_network`
|
* `public_network`
|
||||||
|
|
|
@ -35,7 +35,7 @@ upgrade_ceph_packages: False
|
||||||
# is not needed for versions after infernalis.
|
# is not needed for versions after infernalis.
|
||||||
use_server_package_split: true
|
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:
|
debian_package_dependencies:
|
||||||
- python-pycurl
|
- python-pycurl
|
||||||
|
@ -166,6 +166,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.
|
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
|
||||||
ceph_dev_redhat_distro: centos7
|
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 #
|
# CEPH CONFIGURATION #
|
||||||
|
|
|
@ -49,3 +49,11 @@
|
||||||
state: present
|
state: present
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: ceph_stable_uca
|
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
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
or ceph_dev
|
or ceph_dev
|
||||||
or ceph_origin == "distro"
|
or ceph_origin == "distro"
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph mon
|
- name: install distro or red hat storage ceph mon
|
||||||
dnf:
|
dnf:
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
or ceph_origin == "distro"
|
or ceph_origin == "distro"
|
||||||
or ceph_dev
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph osd
|
- name: install distro or red hat storage ceph osd
|
||||||
yum:
|
yum:
|
||||||
|
@ -68,6 +70,7 @@
|
||||||
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
or ceph_origin == "distro"
|
or ceph_origin == "distro"
|
||||||
or ceph_dev
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph osd
|
- name: install distro or red hat storage ceph osd
|
||||||
dnf:
|
dnf:
|
||||||
|
@ -79,46 +82,55 @@
|
||||||
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
or ceph_origin == "distro"
|
or ceph_origin == "distro"
|
||||||
or ceph_dev
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph mds
|
- name: install distro or red hat storage ceph mds
|
||||||
yum:
|
yum:
|
||||||
name: "ceph-mds"
|
name: "ceph-mds"
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
(ceph_origin == "distro" or ceph_dev or
|
- mds_group_name in group_names
|
||||||
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
|
- ansible_pkg_mgr == "yum"
|
||||||
mds_group_name in group_names and
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
ansible_pkg_mgr == "yum"
|
or ceph_origin == "distro"
|
||||||
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph mds
|
- name: install distro or red hat storage ceph mds
|
||||||
dnf:
|
dnf:
|
||||||
name: "ceph-mds"
|
name: "ceph-mds"
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
(ceph_origin == "distro" or ceph_dev or
|
- mds_group_name in group_names
|
||||||
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
|
- ansible_pkg_mgr == "dnf"
|
||||||
mds_group_name in group_names and
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
ansible_pkg_mgr == "dnf"
|
or ceph_origin == "distro"
|
||||||
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph base
|
- name: install distro or red hat storage ceph base
|
||||||
yum:
|
yum:
|
||||||
name: "ceph-base"
|
name: "ceph-base"
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
(ceph_origin == "distro" or ceph_dev or
|
- client_group_name in group_names
|
||||||
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
|
- ansible_pkg_mgr == "yum"
|
||||||
client_group_name in group_names and
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
ansible_pkg_mgr == "yum"
|
or ceph_origin == "distro"
|
||||||
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph base
|
- name: install distro or red hat storage ceph base
|
||||||
dnf:
|
dnf:
|
||||||
name: "ceph-base"
|
name: "ceph-base"
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
(ceph_origin == "distro" or ceph_dev or
|
- client_group_name in group_names
|
||||||
(ceph_stable and ceph_stable_release not in ceph_stable_releases)) and
|
- ansible_pkg_mgr == "dnf"
|
||||||
client_group_name in group_names and
|
- (ceph_stable and ceph_stable_release not in ceph_stable_releases)
|
||||||
ansible_pkg_mgr == "dnf"
|
or ceph_origin == "distro"
|
||||||
|
or ceph_dev
|
||||||
|
or ceph_custom
|
||||||
|
|
||||||
- name: install ceph-test
|
- name: install ceph-test
|
||||||
yum:
|
yum:
|
||||||
|
|
|
@ -57,3 +57,11 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: ceph_stable_ice
|
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
|
||||||
|
|
Loading…
Reference in New Issue