Explorar o código

startup script changes

Signed-off-by: abhishek-sa1 <abhishek.sa3@dell.com>
abhishek-sa1 %!s(int64=3) %!d(string=hai) anos
pai
achega
6ad25c8e74

+ 22 - 22
control_plane/input_params/base_vars.yml

@@ -144,27 +144,6 @@ language: "en-US"
 # Required field
 default_lease_time: "86400"
 
-### Usage: control_plane_device ###
-
-# The nic/ethernet card that needs to be connected to provision
-# the fabric, idrac and powervault.
-# This nic will be configured by Omnia for the DHCP server.
-# Default value: "eno1"
-mngmnt_network_nic: "eno1"
-
-# The dhcp range for assigning the IPv4 address
-# Example: 172.17.0.1
-# Required field
-mngmnt_network_dhcp_start_range: "172.19.0.100"
-mngmnt_network_dhcp_end_range: "172.19.0.200"
-
-# The mapping file consists of the MAC address and its respective IP address.
-# The format of mapping file should be MAC,IP and must be a CSV file.
-# Eg: xx:yy:zz:aa:bb,172.17.0.5
-# A template for mapping file exists in omnia/examples and is named as mapping_device_file.csv.
-# This depicts the path where user has kept the mapping file for DHCP configurations.
-mngmnt_mapping_file_path: ""
-
 ### Usage: provision_cobbler ###
 
 # The nic/ethernet card that needs to be connected to provision the OS of bare metal servers
@@ -196,6 +175,27 @@ secondary_dns: ""
 # This depicts the path where user has kept the mapping file for DHCP configurations.
 host_mapping_file_path: ""
 
+### Usage: control_plane_device ###
+
+# The nic/ethernet card that needs to be connected to provision
+# the fabric, idrac and powervault.
+# This nic will be configured by Omnia for the DHCP server.
+# Default value: "eno1"
+mngmnt_network_nic: "eno1"
+
+# The dhcp range for assigning the IPv4 address
+# Example: 172.17.0.1
+# Required field
+mngmnt_network_dhcp_start_range: "172.19.0.100"
+mngmnt_network_dhcp_end_range: "172.19.0.200"
+
+# The mapping file consists of the MAC address and its respective IP address.
+# The format of mapping file should be MAC,IP and must be a CSV file.
+# Eg: xx:yy:zz:aa:bb,172.17.0.5
+# A template for mapping file exists in omnia/examples and is named as mapping_device_file.csv.
+# This depicts the path where user has kept the mapping file for DHCP configurations.
+mngmnt_mapping_file_path: ""
+
 ### Usage: control_plane_ib ###
 
 # The nic/ethernet card that needs to be connected to configure infiniband switch
@@ -206,4 +206,4 @@ ib_network_nic: "ib0"
 # The dhcp range for assigning the IPv4 address
 # Example: 172.17.0.1
 ib_network_dhcp_start_range: "172.25.0.100"
-ib_network_dhcp_end_range: "172.25.0.200"
+ib_network_dhcp_end_range: "172.25.0.200"

+ 6 - 2
control_plane/roles/control_plane_k8s/files/startup_omnia.yml

@@ -69,18 +69,22 @@
         warn: false
       when: not mount_iso_check.stat.exists
 
-    - name: Copy files to tmp folder
+    - name: Copy files to mnt folder
       command:  "rsync -AHPSXav {{ mount_dir }} /mnt/{{ provision_os }}"
       changed_when: true
       args:
         warn: false
       when: not mount_iso_check.stat.exists 
+    
+    - name: Unmount tmp directory
+      command: "umount {{ mount_dir }}"
+      changed_when: true
+      failed_when: false
 
     - name: Delete tmp directory
       file:
         path: "{{ mount_dir }}"
         state: absent
-      when: not mount_iso_check.stat.exists
 
     - block:
         - name: Fetch SElinux mode

+ 3 - 3
control_plane/roles/provision_cobbler/files/cobbler_configurations_leap.yml

@@ -104,7 +104,7 @@
 
   - name: Kickstart profile - centos
     copy:
-      src: "/root/centos7.ks"
+      src: "/root/omnia/control_plane/roles/provision_cobbler/files/centos7.ks"
       dest: "/var/lib/cobbler/templates/sample.ks"
       mode: "{{ file_perm }}"
     tags: install
@@ -112,7 +112,7 @@
 
   - name: Kickstart profile - rocky
     copy:
-      src: "/root/rocky8.ks"
+      src: "/root/omnia/control_plane/roles/provision_cobbler/files/rocky8.ks"
       dest: "/var/lib/cobbler/templates/sample.ks"
       mode: "{{ file_perm }}"
     tags: install
@@ -120,7 +120,7 @@
 
   - name: Kickstart profile - leap
     copy:
-      src: "/root/leap15.xml"
+      src: "/root/omnia/control_plane/roles/provision_cobbler/files/leap15.xml"
       dest: "/var/lib/cobbler/templates/sample_autoyast.xml"
       mode: "{{ file_perm }}"
     tags: install

+ 3 - 3
control_plane/roles/provision_cobbler/files/multi_cluster_provisioning.yml

@@ -29,7 +29,7 @@
 
     - name: Kickstart profile - centos
       copy:
-        src: "/root/centos7.ks"
+        src: "/root/omnia/control_plane/roles/provision_cobbler/files/centos7.ks"
         dest: "/var/lib/cobbler/templates/sample.ks"
         mode: "{{ file_perm }}"
       tags: install
@@ -37,7 +37,7 @@
 
     - name: Kickstart profile - rocky
       copy:
-        src: "/root/rocky8.ks"
+        src: "/root/omnia/control_plane/roles/provision_cobbler/files/rocky8.ks"
         dest: "/var/lib/cobbler/templates/sample.ks"
         mode: "{{ file_perm }}"
       tags: install
@@ -45,7 +45,7 @@
 
     - name: Kickstart profile - leap
       copy:
-        src: "/root/leap15.xml"
+        src: "/root/omnia/control_plane/roles/provision_cobbler/files/leap15.xml"
         dest: "/var/lib/cobbler/templates/sample_autoyast.xml"
         mode: "{{ file_perm }}"
       tags: install