]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Use a new snippet for configuring disks on RHEL
authorZack Cerza <zack@redhat.com>
Tue, 12 May 2015 20:33:04 +0000 (14:33 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 12 May 2015 20:57:35 +0000 (14:57 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
roles/cobbler/defaults/main.yml
roles/cobbler/templates/kickstarts/cephlab_rhel.ks
roles/cobbler/templates/snippets/cephlab_rhel_disks [new file with mode: 0644]

index 7fd8f5576e48d7d5c86fc8d0de5af1d282c0e17c..b095e402963e8b6035b94d554b13b797f7afbf85 100644 (file)
@@ -9,6 +9,7 @@ snippets:
   - cephlab_apt-mirror_hack
   - cephlab_packages_rhel
   - cephlab_rc_local
+  - cephlab_rhel_disks
 
 scripts:
   - cephlab_preseed_late
index 6c6f39ad8ccd344da60d067dc8f7dd3f92d8aebe..4f7728b521aa45ca823d0e3d4723601ab35b362f 100644 (file)
@@ -6,14 +6,7 @@
 #platform=x86, AMD64, or Intel EM64T
 # System authorization information
 auth  --useshadow  --enablemd5
-# Partition clearing information
-clearpart --all --initlabel
-# Use a small root partition on one disk
-part / --fstype="ext4" --ondisk=sda --size=20000
-# Clear the Master Boot Record
-zerombr
-# System bootloader configuration
-bootloader --location=mbr --boot-drive=sda
+$SNIPPET('cephlab_rhel_disks')
 # Use text mode install
 text
 # Firewall configuration
diff --git a/roles/cobbler/templates/snippets/cephlab_rhel_disks b/roles/cobbler/templates/snippets/cephlab_rhel_disks
new file mode 100644 (file)
index 0000000..f729270
--- /dev/null
@@ -0,0 +1,15 @@
+## {{ ansible_managed }}
+#set os_version = $getVar('os_version','')
+# Partition clearing information
+clearpart --all --initlabel
+# Use a small root partition on one disk
+part / --fstype="ext4" --ondisk=sda --size=20000
+# Clear the Master Boot Record
+zerombr
+# System bootloader configuration
+#if $os_version == 'rhel7'
+    #set bootloader_args = "--location=mbr --boot-drive=sda"
+#else
+    #set bootloader_args = "--location=mbr --driveorder=sda"
+#end if
+bootloader $bootloader_args