mirror of https://github.com/ceph/ceph-ansible.git
common: iso install on Debian is supported by rhcs
Also adds support for RCSH installation on Debian. Signed-off-by: Sébastien Han <seb@redhat.com>pull/2003/head
parent
530bf5d134
commit
feaf5ff9c6
|
@ -64,17 +64,6 @@
|
|||
tags:
|
||||
- package-install
|
||||
|
||||
- name: verify that ceph_rhcs_cdn_debian_repo url is valid for red hat storage
|
||||
fail:
|
||||
msg: "iso installation is not supported by the Ceph Debian rhcs version"
|
||||
when:
|
||||
- ceph_origin == 'repository'
|
||||
- ceph_repository == 'rhcs'
|
||||
- ceph_repository_type == 'iso'
|
||||
- ansible_os_family == 'Debian'
|
||||
tags:
|
||||
- package-install
|
||||
|
||||
- name: make sure monitor_interface or monitor_address is defined
|
||||
fail:
|
||||
msg: "you must set monitor_interface or monitor_address"
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
---
|
||||
- name: include prerequisite_rhcs_iso_install_debian.yml
|
||||
include: prerequisite_rhcs_iso_install_debian.yml
|
||||
when:
|
||||
- ceph_repository_type == 'iso'
|
||||
|
||||
- name: include prerequisite_rhcs_cdn_install_debian.yml
|
||||
include: prerequisite_rhcs_cdn_install_debian.yml
|
||||
when:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: create red hat storage package directories
|
||||
- name: create red hat storage package directories for redhat systems
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
|
@ -7,7 +7,7 @@
|
|||
- "{{ ceph_rhcs_mount_path }}"
|
||||
- "{{ ceph_rhcs_repository_path }}"
|
||||
|
||||
- name: ensure destination iso directory exists
|
||||
- name: ensure destination iso directory exists for redhat systems
|
||||
file:
|
||||
path: "{{ ceph_rhcs_iso_path | dirname }}"
|
||||
state: directory
|
||||
|
@ -15,14 +15,14 @@
|
|||
when:
|
||||
- ceph_rhcs_iso_path | dirname != '/'
|
||||
|
||||
- name: fetch the red hat storage iso from the ansible server
|
||||
- name: fetch the red hat storage iso from the ansible server for redhat systems
|
||||
copy:
|
||||
src: "{{ ceph_rhcs_iso_path }}"
|
||||
dest: "{{ ceph_rhcs_iso_path }}"
|
||||
|
||||
# assumption: ceph_rhcs_mount_path does not specify directory
|
||||
|
||||
- name: mount red hat storage iso file
|
||||
- name: mount red hat storage iso file for redhat systems
|
||||
mount:
|
||||
name: "{{ ceph_rhcs_mount_path }}"
|
||||
src: "{{ ceph_rhcs_iso_path }}"
|
||||
|
@ -31,24 +31,24 @@
|
|||
passno: 2
|
||||
state: mounted
|
||||
|
||||
- name: copy red hat storage iso content
|
||||
- name: copy red hat storage iso content for redhat systems
|
||||
shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }}
|
||||
args:
|
||||
creates: "{{ ceph_rhcs_repository_path }}/README"
|
||||
|
||||
- name: unmount red hat storage iso file
|
||||
- name: unmount red hat storage iso file for redhat systems
|
||||
mount:
|
||||
name: "{{ ceph_rhcs_mount_path }}"
|
||||
src: "{{ ceph_rhcs_iso_path }}"
|
||||
fstype: iso9660
|
||||
state: unmounted
|
||||
|
||||
- name: install red hat storage repository key
|
||||
- name: install red hat storage repository key for redhat systems
|
||||
rpm_key:
|
||||
key: "{{ ceph_rhcs_repository_path }}/RPM-GPG-KEY-redhat-release"
|
||||
state: present
|
||||
|
||||
- name: add red hat storage repository
|
||||
- name: add red hat storage repository for redhat systems
|
||||
template:
|
||||
src: "{{ role_path }}/templates/redhat_storage_repo.j2"
|
||||
dest: /etc/yum.repos.d/rh_storage.repo
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
- name: create red hat storage package directories for debian systems
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ ceph_rhcs_mount_path }}"
|
||||
- "{{ ceph_rhcs_repository_path }}"
|
||||
|
||||
- name: ensure destination iso directory exists for debian systems
|
||||
file:
|
||||
path: "{{ ceph_rhcs_iso_path | dirname }}"
|
||||
state: directory
|
||||
recurse: yes
|
||||
when:
|
||||
- ceph_rhcs_iso_path | dirname != '/'
|
||||
|
||||
- name: fetch the red hat storage iso from the ansible server for debian systems
|
||||
copy:
|
||||
src: "{{ ceph_rhcs_iso_path }}"
|
||||
dest: "{{ ceph_rhcs_iso_path }}"
|
||||
|
||||
# assumption: ceph_rhcs_mount_path does not specify directory
|
||||
|
||||
- name: mount red hat storage iso file for debian systems
|
||||
mount:
|
||||
name: "{{ ceph_rhcs_mount_path }}"
|
||||
src: "{{ ceph_rhcs_iso_path }}"
|
||||
fstype: iso9660
|
||||
opts: ro,loop,noauto
|
||||
passno: 2
|
||||
state: mounted
|
||||
|
||||
- name: copy red hat storage iso content for debian systems
|
||||
shell: cp -r {{ ceph_rhcs_mount_path }}/* {{ ceph_rhcs_repository_path }}
|
||||
args:
|
||||
creates: "{{ ceph_rhcs_repository_path }}/README"
|
||||
|
||||
- name: unmount red hat storage iso file
|
||||
mount:
|
||||
name: "{{ ceph_rhcs_mount_path }}"
|
||||
src: "{{ ceph_rhcs_iso_path }}"
|
||||
fstype: iso9660
|
||||
state: unmounted
|
||||
|
||||
- name: install red hat storage repository key for debian systems
|
||||
apt_key:
|
||||
file: "{{ ceph_rhcs_repository_path }}/RPM-GPG-KEY-redhat-release"
|
||||
state: present
|
||||
|
||||
- name: add red hat storage repository for debian systems
|
||||
template:
|
||||
src: "{{ role_path }}/templates/redhat_storage_repo.j2"
|
||||
dest: /etc/apt/sources.list.d/rh_storage.list
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
Loading…
Reference in New Issue