]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: rename rh_storage to rhcs to match product name 1203/head
authorSébastien Han <seb@redhat.com>
Tue, 20 Dec 2016 12:47:44 +0000 (13:47 +0100)
committerSébastien Han <seb@redhat.com>
Tue, 20 Dec 2016 12:49:11 +0000 (13:49 +0100)
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-common/tasks/main.yml
roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml [deleted file]
roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml [deleted file]
roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install.yml [new file with mode: 0644]
roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_iso_install.yml [new file with mode: 0644]

index 4691f65756ed94833df17cfc1ba3a4f3f68b958b..fcbe7c26fe646e000a5dafacaba15c25a4a89195 100644 (file)
@@ -15,7 +15,7 @@
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
 
-- include: ./pre_requisites/prerequisite_rh_storage_iso_install.yml
+- include: ./pre_requisites/prerequisite_rhcs_iso_install.yml
   when:
     - ceph_rhcs
     - ceph_rhcs_iso_install
@@ -24,7 +24,7 @@
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
 
-- include: ./pre_requisites/prerequisite_rh_storage_cdn_install.yml
+- include: ./pre_requisites/prerequisite_rhcs_cdn_install.yml
   when:
     - ceph_rhcs
     - ceph_rhcs_cdn_install
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_cdn_install.yml
deleted file mode 100644 (file)
index 255550d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- name: determine if node is registered with subscription-manager.
-  command: subscription-manager identity
-  register: subscription
-  changed_when: false
-  always_run: true
-
-- name: check if the red hat storage monitor repo is already present
-  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
-  changed_when: false
-  failed_when: false
-  register: rh_storage_mon_repo
-  always_run: true
-  when: mon_group_name in group_names
-
-- name: enable red hat storage monitor repository
-  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
-  changed_when: false
-  when:
-    - mon_group_name in group_names
-    - rh_storage_mon_repo.rc != 0
-
-- name: check if the red hat storage osd repo is already present
-  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
-  changed_when: false
-  failed_when: false
-  register: rh_storage_osd_repo
-  always_run: true
-  when: osd_group_name in group_names
-
-- name: enable red hat storage osd repository
-  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
-  changed_when: false
-  when:
-    - osd_group_name in group_names
-    - rh_storage_osd_repo.rc != 0
-
-- name: check if the red hat storage rados gateway / mds repo is already present
-  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
-  changed_when: false
-  failed_when: false
-  register: rh_storage_rgw_mds_repo
-  always_run: true
-  when: (rgw_group_name in group_names or mds_group_name in group_names)
-
-- name: enable red hat storage rados gateway / mds repository
-  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
-  changed_when: false
-  when:
-    - (rgw_group_name in group_names or mds_group_name in group_names)
-    - rh_storage_rgw_mds_repo.rc != 0
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml
deleted file mode 100644 (file)
index e589fec..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- 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
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_cdn_install.yml
new file mode 100644 (file)
index 0000000..5e7603c
--- /dev/null
@@ -0,0 +1,51 @@
+---
+- name: determine if node is registered with subscription-manager.
+  command: subscription-manager identity
+  register: subscription
+  changed_when: false
+  always_run: true
+
+- name: check if the red hat storage monitor repo is already present
+  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
+  changed_when: false
+  failed_when: false
+  register: rhcs_mon_repo
+  always_run: true
+  when: mon_group_name in group_names
+
+- name: enable red hat storage monitor repository
+  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-mon-rpms
+  changed_when: false
+  when:
+    - mon_group_name in group_names
+    - rhcs_mon_repo.rc != 0
+
+- name: check if the red hat storage osd repo is already present
+  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
+  changed_when: false
+  failed_when: false
+  register: rhcs_osd_repo
+  always_run: true
+  when: osd_group_name in group_names
+
+- name: enable red hat storage osd repository
+  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-osd-rpms
+  changed_when: false
+  when:
+    - osd_group_name in group_names
+    - rhcs_osd_repo.rc != 0
+
+- name: check if the red hat storage rados gateway / mds repo is already present
+  shell: yum --noplugins --cacheonly repolist | grep -sq rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
+  changed_when: false
+  failed_when: false
+  register: rhcs_rgw_mds_repo
+  always_run: true
+  when: (rgw_group_name in group_names or mds_group_name in group_names)
+
+- name: enable red hat storage rados gateway / mds repository
+  command: subscription-manager repos --enable rhel-7-server-rhceph-{{ ceph_rhcs_version }}-tools-rpms
+  changed_when: false
+  when:
+    - (rgw_group_name in group_names or mds_group_name in group_names)
+    - rhcs_rgw_mds_repo.rc != 0
diff --git a/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_iso_install.yml b/roles/ceph-common/tasks/pre_requisites/prerequisite_rhcs_iso_install.yml
new file mode 100644 (file)
index 0000000..e589fec
--- /dev/null
@@ -0,0 +1,43 @@
+---
+- 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