mirror of https://github.com/ceph/ceph-ansible.git
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
---
|
|
- name: create red hat storage package directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ ceph_rhcs_mount_path }}"
|
|
- "{{ ceph_rhcs_repository_path }}"
|
|
|
|
- name: ensure destination iso directory exists
|
|
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
|
|
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
|
|
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
|
|
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
|