Merge pull request #402 from msambol/refactor_ceph_common

Update ceph-common styling
pull/404/head
Leseb 2015-09-04 11:47:06 +02:00
commit 8a5bf6bcf7
13 changed files with 251 additions and 234 deletions

View File

@ -1,6 +1,7 @@
---
- name: update apt cache
apt: update-cache=yes
apt:
update-cache: yes
- name: restart ceph mons
command: service ceph restart mon
@ -66,19 +67,19 @@
rgw_group_name in group_names
- name: restart apache2
service: >
name=apache2
state=restarted
enabled=yes
service:
name: apache2
state: restarted
enabled: yes
when:
ansible_os_family == 'Debian' and
rgw_group_name in group_names
- name: restart apache2
service: >
name=httpd
state=restarted
enabled=yes
service:
name: httpd
state: restarted
enabled: yes
when:
ansible_os_family == 'RedHat' and
rgw_group_name in group_names

View File

@ -1,6 +1,7 @@
---
- name: make sure an installation source was chosen
fail: msg="choose an installation source or read https://github.com/ceph/ceph-ansible/wiki"
fail:
msg: "choose an installation source or read https://github.com/ceph/ceph-ansible/wiki"
when:
not ceph_stable and
not ceph_dev and
@ -8,30 +9,36 @@
not ceph_stable_rh_storage
- name: verify that a method was chosen for red hat storage
fail: msg="choose between ceph_stable_rh_storage_cdn_install and ceph_stable_rh_storage_iso_install"
fail:
msg: "choose between ceph_stable_rh_storage_cdn_install and ceph_stable_rh_storage_iso_install"
when:
ceph_stable_rh_storage and
not ceph_stable_rh_storage_cdn_install and
not ceph_stable_rh_storage_iso_install
- name: make sure journal_size configured
fail: msg="journal_size must be configured. See http://ceph.com/docs/master/rados/configuration/osd-config-ref/"
fail:
msg: "journal_size must be configured. See http://ceph.com/docs/master/rados/configuration/osd-config-ref/"
when: journal_size|int == 0
- name: make sure monitor_interface configured
fail: msg="monitor_interface must be configured. Interface for the monitor to listen on"
fail:
msg: "monitor_interface must be configured. Interface for the monitor to listen on"
when: monitor_interface == 'interface'
- name: make sure cluster_network configured
fail: msg="cluster_network must be configured. Ceph replication network"
fail:
msg: "cluster_network must be configured. Ceph replication network"
when: cluster_network == '0.0.0.0/0'
- name: make sure public_network configured
fail: msg="public_network must be configured. Ceph public network"
fail:
msg: "public_network must be configured. Ceph public network"
when: public_network == '0.0.0.0/0'
- name: make sure an osd scenario was chosen
fail: msg="please choose an osd scenario"
fail:
msg: "please choose an osd scenario"
when:
osd_group_name is defined and
osd_group_name in group_names and
@ -40,7 +47,8 @@
not osd_directory
- name: verify only one osd scenario was chosen
fail: msg="please select only one osd scenario"
fail:
msg: "please select only one osd scenario"
when:
osd_group_name is defined and
osd_group_name in group_names and
@ -49,7 +57,8 @@
(raw_multi_journal and osd_directory))
- name: verify devices have been provided
fail: msg="please provide devices to your osd scenario"
fail:
msg: "please provide devices to your osd scenario"
when:
osd_group_name is defined and
osd_group_name in group_names and
@ -58,7 +67,8 @@
devices is not defined
- name: verify journal devices have been provided
fail: msg="please provide devices to your osd scenario"
fail:
msg: "please provide devices to your osd scenario"
when:
osd_group_name is defined and
osd_group_name in group_names and
@ -67,7 +77,8 @@
devices is not defined)
- name: verify directories have been provided
fail: msg="please provide directories to your osd scenario"
fail:
msg: "please provide directories to your osd scenario"
when:
osd_group_name is defined and
osd_group_name in group_names and

View File

@ -1,18 +1,22 @@
---
- name: fail on unsupported system
fail: "msg=System not supported {{ ansible_system }}"
fail:
msg: "System not supported {{ ansible_system }}"
when: "ansible_system not in ['Linux']"
- name: fail on unsupported architecture
fail: "msg=Architecture not supported {{ ansible_architecture }}"
fail:
msg: "Architecture not supported {{ ansible_architecture }}"
when: "ansible_architecture not in ['x86_64']"
- name: fail on unsupported distribution
fail: "msg=Distribution not supported {{ ansible_os_family }}"
fail:
msg: "Distribution not supported {{ ansible_os_family }}"
when: "ansible_os_family not in ['Debian', 'RedHat']"
- name: fail on unsupported distribution for red hat storage
fail: "msg=Distribution not supported {{ ansible_distribution_version }} by Red Hat Storage, only RHEL 7.1"
fail:
msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Storage, only RHEL 7.1"
when:
ceph_stable_rh_storage and
{{ ansible_distribution_version | version_compare('7.1', '<') }}

View File

@ -1,40 +1,40 @@
---
- name: install the ceph repository stable key
apt_key: >
data="{{ lookup('file', '../../files/cephstable.asc') }}"
state=present
apt_key:
data: "{{ lookup('file', '../../files/cephstable.asc') }}"
state: present
when: ceph_stable
- name: install the ceph development repository key
apt_key: >
data="{{ lookup('file', '../../files/cephdev.asc') }}"
state=present
apt_key:
data: "{{ lookup('file', '../../files/cephdev.asc') }}"
state: present
when: ceph_dev
- name: install intank ceph enterprise repository key
apt_key: >
data="{{ lookup('file', '../../files/cephstableice.asc') }}"
state=present
apt_key:
data: "{{ lookup('file', '../../files/cephstableice.asc') }}"
state: present
when: ceph_stable_ice
- name: add ceph stable repository
apt_repository: >
repo="deb http://ceph.com/debian-{{ ceph_stable_release }}/ {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
state=present
apt_repository:
repo: "deb http://ceph.com/debian-{{ ceph_stable_release }}/ {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
state: present
changed_when: false
when: ceph_stable
- name: add ceph development repository
apt_repository: >
repo="deb http://gitbuilder.ceph.com/ceph-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/{{ ceph_dev_branch }} {{ ansible_lsb.codename }} main"
state=present
apt_repository:
repo: "deb http://gitbuilder.ceph.com/ceph-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/{{ ceph_dev_branch }} {{ ansible_lsb.codename }} main"
state: present
changed_when: false
when: ceph_dev
- name: add inktank ceph enterprise repository
apt_repository: >
repo="deb file://{{ ceph_stable_ice_temp_path }} {{ ansible_lsb.codename }} main"
state=present
apt_repository:
repo: "deb file://{{ ceph_stable_ice_temp_path }} {{ ansible_lsb.codename }} main"
state: present
changed_when: false
when: ceph_stable_ice

View File

@ -1,10 +1,10 @@
---
- name: install dependencies
apt: >
pkg={{ item }}
state=present
update_cache=yes
cache_valid_time=3600
apt:
pkg: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items: debian_package_dependencies
- name: configure ceph apt repository
@ -12,10 +12,10 @@
when: ceph_origin == 'upstream'
- name: install ceph
apt: >
pkg={{ item }}
state=latest
default_release={{ ansible_distribution_release }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}
apt:
pkg: "{{ item }}"
state: latest
default_release: "{{ ansible_distribution_release }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
with_items:
- ceph
- ceph-common #|
@ -25,20 +25,20 @@
- libcephfs1 #|
- name: install rados gateway
apt: >
pkg=radosgw
state=latest
update_cache=yes
apt:
pkg: radosgw
state: latest
update_cache: yes
when:
rgw_group_name in group_names
- name: configure rbd clients directories
file: >
path={{ item }}
state=directory
owner=libvirt-qemu
group=kvm
mode=0755
file:
path: "{{ item }}"
state: directory
owner: libvirt-qemu
group: kvm
mode: 0755
with_items:
- rbd_client_log_path
- rbd_client_admin_socket_path

View File

@ -1,8 +1,8 @@
---
- name: install dependencies
yum: >
name={{ item }}
state=present
yum:
name: "{{ item }}"
state: present
with_items: redhat_package_dependencies
- name: configure ceph yum repository
@ -10,15 +10,15 @@
when: ceph_origin == 'upstream'
- name: install ceph
yum: >
name=ceph
state=latest
yum:
name: ceph
state: latest
when: not ceph_stable_rh_storage
- name: install red hat storage ceph mon
yum: >
name={{ item }}
state=latest
yum:
name: "{{ item }}"
state: latest
with_items:
- ceph
- ceph-mon
@ -27,9 +27,9 @@
mon_group_name in group_names
- name: install red hat storage ceph osd
yum: >
name={{ item }}
state=latest
yum:
name: "{{ item }}"
state: latest
with_items:
- ceph
- ceph-osd
@ -38,27 +38,27 @@
osd_group_name in group_names
- name: install Inktank Ceph Enterprise RBD Kernel modules
yum: >
name={{ item }}
yum:
name: "{{ item }}"
with_items:
- "{{ ceph_stable_ice_temp_path }}/kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm"
- "{{ ceph_stable_ice_temp_path }}/kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm"
when: ceph_stable_ice
- name: install rados gateway
yum: >
name=ceph-radosgw
state=latest
yum:
name: ceph-radosgw
state: latest
when:
rgw_group_name in group_names
- name: configure rbd clients directories
file: >
path={{ item }}
state=directory
owner=qemu
group=libvirtd
mode=0755
file:
path: "{{ item }}"
state: directory
owner: qemu
group: libvirtd
mode: 0755
with_items:
- rbd_client_log_path
- rbd_client_admin_socket_path

View File

@ -1,15 +1,15 @@
---
- name: add ceph extra
apt_repository: >
repo="deb http://ceph.com/packages/ceph-extras/debian {{ ansible_lsb.codename }} main"
state=present
apt_repository:
repo: "deb http://ceph.com/packages/ceph-extras/debian {{ ansible_lsb.codename }} main"
state: present
when: ansible_lsb.codename in ['natty', 'oneiric', 'precise', 'quantal', 'raring', 'sid', 'squeeze', 'wheezy']
# NOTE (leseb): needed for Ubuntu 12.04 to have access to libapache2-mod-fastcgi if 100-continue isn't being used
- name: enable multiverse repo for precise
apt_repository: >
repo="{{ item }}"
state=present
apt_repository:
repo: "{{ item }}"
state: present
with_items:
- deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
- deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
@ -20,9 +20,9 @@
# NOTE (leseb): disable the repo when we are using the Ceph repo for 100-continue packages
- name: disable multiverse repo for precise
apt_repository: >
repo="{{ item }}"
state=absent
apt_repository:
repo: "{{ item }}"
state: absent
with_items:
- deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }} multiverse
- deb http://archive.ubuntu.com/ubuntu {{ ansible_lsb.codename }}-updates multiverse
@ -49,16 +49,16 @@
# NOTE (leseb): if using 100-continue, add Ceph dev key
- name: install the ceph development repository key
apt_key: >
data="{{ lookup('file', 'cephdev.asc') }}"
state=present
apt_key:
data: "{{ lookup('file', 'cephdev.asc') }}"
state: present
when: http_100_continue
# NOTE (leseb): if using 100-continue, add Ceph sources and update
- name: add ceph apache and fastcgi sources
apt_repository: >
repo="{{ item }}"
state=present
apt_repository:
repo: "{{ item }}"
state: present
with_items:
- deb http://gitbuilder.ceph.com/apache2-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
- deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
@ -67,9 +67,9 @@
# NOTE (leseb): else remove them to ensure you use the default packages
- name: remove ceph apache and fastcgi sources
apt_repository: >
repo="{{ item }}"
state=absent
apt_repository:
repo: "{{ item }}"
state: absent
with_items:
- deb http://gitbuilder.ceph.com/apache2-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
- deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ ansible_lsb.codename }}-x86_64-basic/ref/master {{ ansible_lsb.codename }} main
@ -78,10 +78,10 @@
# NOTE (leseb): purge Ceph Apache and FastCGI packages if needed
- name: purge ceph apache and fastcgi packages
apt: >
pkg="{{ item }}"
state=absent
purge=yes
apt:
pkg: "{{ item }}"
state: absent
purge: yes
with_items:
- apache2
- apache2-bin
@ -96,20 +96,20 @@
purge_ceph_apache.changed
- name: install apache and fastcgi
apt: >
pkg={{ item }}
state=present
update_cache=yes
apt:
pkg: "{{ item }}"
state: present
update_cache: yes
with_items:
- apache2
- libapache2-mod-fastcgi
- name: install default httpd.conf
template: >
src=../../templates/httpd.conf
dest=/etc/apache2/httpd.conf
owner=root
group=root
template:
src: ../../templates/httpd.conf
dest: /etc/apache2/httpd.conf
owner: root
group: root
- name: enable some apache mod rewrite and fastcgi
command: "{{ item }}"
@ -119,11 +119,11 @@
changed_when: false
- name: install rados gateway vhost
template: >
src=../../templates/rgw.conf
dest=/etc/apache2/sites-available/rgw.conf
owner=root
group=root
template:
src: ../../templates/rgw.conf
dest: /etc/apache2/sites-available/rgw.conf
owner: root
group: root
- name: enable rados gateway vhost and disable default site
command: "{{ item }}"
@ -136,9 +136,9 @@
- restart apache2
- name: install s3gw.fcgi script
template: >
src=../../templates/s3gw.fcgi.j2
dest=/var/www/s3gw.fcgi
mode=0555
owner=root
group=root
template:
src: ../../templates/s3gw.fcgi.j2
dest: /var/www/s3gw.fcgi
mode: 0555
owner: root
group: root

View File

@ -1,41 +1,42 @@
---
- name: add ceph extra
template: >
src=../../templates/ceph-extra.repo
dest=/etc/yum.repos.d
owner=root
group=root
template:
src: ../../templates/ceph-extra.repo
dest: /etc/yum.repos.d
owner: root
group: root
- name: add special fastcgi repository key
rpm_key: key=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm_key:
key: http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
- name: add special fastcgi repository
command: rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
changed_when: false
- name: install apache and fastcgi
yum: >
name={{ item }}
state=present
yum:
name: "{{ item }}"
state: present
with_items:
- httpd
- mod_fastcgi
- mod_fcgid
- name: install rados gateway vhost
template: >
src=../../templates/rgw.conf
dest=/etc/httpd/conf.d/rgw.conf
owner=root
group=root
template:
src: ../../templates/rgw.conf
dest: /etc/httpd/conf.d/rgw.conf
owner: root
group: root
- name: install s3gw.fcgi script
template: >
src=../../templates/s3gw.fcgi.j2
dest=/var/www/s3gw.fcgi
mode=0555
owner=root
group=root
template:
src: ../../templates/s3gw.fcgi.j2
dest: /var/www/s3gw.fcgi
mode: 0555
owner: root
group: root
- name: disable default site
shell: sed -i "s/^[^+#]/#/g" /etc/httpd/conf.d/welcome.conf

View File

@ -1,58 +1,58 @@
---
- name: install the ceph stable repository key
rpm_key: >
key={{ ceph_stable_key }}
state=present
rpm_key:
key: "{{ ceph_stable_key }}"
state: present
when: ceph_stable
- name: install the ceph development repository key
rpm_key: >
key={{ ceph_dev_key }}
state=present
rpm_key:
key: "{{ ceph_dev_key }}"
state: present
when: ceph_dev
- name: install inktank ceph enterprise repository key
rpm_key: >
key={{ ceph_stable_ice_temp_path }}/release.asc
state=present
rpm_key:
key: "{{ ceph_stable_ice_temp_path }}/release.asc"
state: present
when: ceph_stable_ice
- name: install red hat storage repository key
rpm_key: >
key={{ ceph_stable_rh_storage_repository_path }}/RPM-GPG-KEY-redhat-release
state=present
rpm_key:
key: "{{ ceph_stable_rh_storage_repository_path }}/RPM-GPG-KEY-redhat-release"
state: present
when:
ceph_stable_rh_storage and
ceph_stable_rh_storage_iso_install
- name: add ceph stable repository
yum: name=http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
yum:
name: http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
changed_when: false
when: ceph_stable
- name: add ceph development repository
yum: name=http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
yum:
name: http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
changed_when: false
when: ceph_dev
- name: add inktank ceph enterprise repository
template: >
src=redhat_ice_repo.j2
dest=/etc/yum.repos.d/ice.repo
owner=root
group=root
mode=0644
template:
src: redhat_ice_repo.j2
dest: /etc/yum.repos.d/ice.repo
owner: root
group: root
mode: 0644
when: ceph_stable_ice
- name: add red hat storage repository
template: >
src=redhat_storage_repo.j2
dest=/etc/yum.repos.d/rh_storage.repo
owner=root
group=root
mode=0644
template:
src: redhat_storage_repo.j2
dest: /etc/yum.repos.d/rh_storage.repo
owner: root
group: root
mode: 0644
when:
ceph_stable_rh_storage and
ceph_stable_rh_storage_iso_install

View File

@ -57,26 +57,26 @@
- name: generate cluster uuid
local_action: shell uuidgen | tee {{ fetch_directory }}/ceph_cluster_uuid.conf
creates={{ fetch_directory }}/ceph_cluster_uuid.conf
creates="{{ fetch_directory }}/ceph_cluster_uuid.conf"
register: cluster_uuid
sudo: false
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
- name: read cluster uuid if it already exists
local_action: command cat {{ fetch_directory }}/ceph_cluster_uuid.conf
removes={{ fetch_directory }}/ceph_cluster_uuid.conf
removes="{{ fetch_directory }}/ceph_cluster_uuid.conf"
changed_when: false
register: cluster_uuid
sudo: false
when: fsid != '4a158d27-f750-41d5-9e7f-26ce4c9d2d45'
- name: generate ceph configuration file
template: >
src=ceph.conf.j2
dest=/etc/ceph/ceph.conf
owner=root
group=root
mode=0644
template:
src: ceph.conf.j2
dest: /etc/ceph/ceph.conf
owner: root
group: root
mode: 0644
notify:
- restart ceph mons
- restart ceph mons on ubuntu
@ -89,9 +89,9 @@
- restart ceph rgws on red hat
- name: create rbd client directory
file: >
path={{ rbd_client_admin_socket_path }}
state=directory
owner=root
group=root
mode=0644
file:
path: "{{ rbd_client_admin_socket_path }}"
state: directory
owner: root
group: root
mode: 0644

View File

@ -17,10 +17,10 @@
when: disable_swap
- name: apply operating system tuning
sysctl: >
name="{{ item.name }}"
value="{{ item.value }}"
state=present
sysctl_file=/etc/sysctl.conf
ignoreerrors=yes
sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
sysctl_file: /etc/sysctl.conf
ignoreerrors: yes
with_items: os_tuning_params

View File

@ -1,27 +1,27 @@
---
- name: create ice package directory
file: >
path={{ ceph_stable_ice_temp_path }}
state=directory
owner=root
group=root
mode=0644
file:
path: "{{ ceph_stable_ice_temp_path }}"
state: directory
owner: root
group: root
mode: 0644
when: ceph_stable_ice
- name: get ice packages
get_url: >
url_username={{ ceph_stable_ice_user }}
url_password={{ ceph_stable_ice_password }}
url={{ ceph_stable_ice_url }}/{{ ceph_stable_ice_version }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
dest={{ ceph_stable_ice_temp_path }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
get_url:
url_username: "{{ ceph_stable_ice_user }}"
url_password: "{{ ceph_stable_ice_password }}"
url: "{{ ceph_stable_ice_url }}/{{ ceph_stable_ice_version }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz"
dest: "{{ ceph_stable_ice_temp_path }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz"
when: ceph_stable_ice
- name: get ice Kernel Modules
get_url: >
url_username={{ ceph_stable_ice_user }}
url_password={{ ceph_stable_ice_password }}
url={{ ceph_stable_ice_url }}/{{ ceph_stable_ice_kmod_version }}/{{ item }}
dest={{ ceph_stable_ice_temp_path }}
get_url:
url_username: "{{ ceph_stable_ice_user }}"
url_password: "{{ ceph_stable_ice_password }}"
url: "{{ ceph_stable_ice_url }}/{{ ceph_stable_ice_kmod_version }}/{{ item }}"
dest: "{{ ceph_stable_ice_temp_path }}"
with_items:
- kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm
- kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm
@ -30,15 +30,15 @@
ansible_os_family == 'RedHat'
- name: stat extracted ice repo files
stat: >
path={{ ceph_stable_ice_temp_path }}/ice_setup.py
stat:
path: "{{ ceph_stable_ice_temp_path }}/ice_setup.py"
register: repo_exist
when: ceph_stable_ice
- name: extract ice packages
shell: >
tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
chdir={{ ceph_stable_ice_temp_path }}
shell: tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
args:
chdir: "{{ ceph_stable_ice_temp_path }}"
changed_when: false
when:
ceph_stable_ice and

View File

@ -1,32 +1,32 @@
---
- name: create red hat storage package directories
file: >
path={{ item }}
state=directory
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ ceph_stable_rh_storage_mount_path }}"
- "{{ ceph_stable_rh_storage_repository_path }}"
- name: fetch the red hat storage iso from the ansible server
copy: >
src={{ ceph_stable_rh_storage_iso_path }}
dest={{ ceph_stable_rh_storage_iso_path }}
copy:
src: "{{ ceph_stable_rh_storage_iso_path }}"
dest: "{{ ceph_stable_rh_storage_iso_path }}"
- name: mount red hat storage iso file
mount: >
name={{ ceph_stable_rh_storage_mount_path }}
src={{ ceph_stable_rh_storage_iso_path }}
fstype=iso9660
state=mounted
mount:
name: "{{ ceph_stable_rh_storage_mount_path }}"
src: "{{ ceph_stable_rh_storage_iso_path }}"
fstype: iso9660
state: mounted
- name: copy red hat storage iso content
shell:
cp -r {{ ceph_stable_rh_storage_mount_path }}/* {{ ceph_stable_rh_storage_repository_path }}
creates={{ ceph_stable_rh_storage_repository_path }}/README
shell: cp -r {{ ceph_stable_rh_storage_mount_path }}/* {{ ceph_stable_rh_storage_repository_path }}
args:
creates: "{{ ceph_stable_rh_storage_repository_path }}/README"
- name: mount red hat storage iso file
mount: >
name={{ ceph_stable_rh_storage_mount_path }}
src={{ ceph_stable_rh_storage_iso_path }}
fstype=iso9660
state=unmounted
mount:
name: "{{ ceph_stable_rh_storage_mount_path }}"
src: "{{ ceph_stable_rh_storage_iso_path }}"
fstype: iso9660
state: unmounted