2017-10-06 00:33:17 +08:00
|
|
|
---
|
|
|
|
- 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:
|
2017-10-07 04:17:50 +08:00
|
|
|
file: "{{ ceph_rhcs_repository_path }}/MON/release.asc"
|
2017-10-06 00:33:17 +08:00
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: add red hat storage repository for debian systems
|
2017-10-07 04:17:50 +08:00
|
|
|
apt_repository:
|
|
|
|
repo: "deb file://{{ ceph_rhcs_repository_path }}/{{ item }} {{ ansible_lsb.codename }} main"
|
|
|
|
state: present
|
2018-11-02 02:48:06 +08:00
|
|
|
update_cache: yes
|
2017-10-07 04:17:50 +08:00
|
|
|
with_items:
|
|
|
|
- MON
|
|
|
|
- OSD
|
|
|
|
- Tools
|