Also adds support for RCSH installation on Debian.
Signed-off-by: Sébastien Han <seb@redhat.com>
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"
url: https://shaman.ceph.com/api/repos/nfs-ganesha/next/latest/{{ ansible_distribution | lower }}/{{ ansible_distribution_release }}/flavors/{{ nfs_ganesha_flavor }}/repo
return_content: yes
register: nfs_ganesha_apt_repo
- when:
+ when:
- nfs_group_name in group_names
- nfs_ganesha_dev
owner: root
group: root
backup: yes
- when:
+ when:
- nfs_group_name in group_names
- nfs_ganesha_dev
---
+- 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:
---
-- name: create red hat storage package directories
+- name: create red hat storage package directories for redhat systems
file:
path: "{{ item }}"
state: directory
- "{{ 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
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 }}"
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
--- /dev/null
+---
+- 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