-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2003 from ceph/debian-iso
[skip ci] common: iso install on Debian is supported by rhcs
- Loading branch information
Showing
5 changed files
with
72 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
roles/ceph-common/tasks/installs/prerequisite_rhcs_iso_install_debian.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |