ソースを参照

Merge pull request #779 from Bhagyashree-shetty/devel

Issue #778: Code changes for nics activation on leap compute nodes
Sujit Jadhav 3 年 前
コミット
6cdf250866

+ 7 - 0
control_plane/roles/provision_cobbler/files/temp_leap15.xml

@@ -35,6 +35,13 @@
       <hostname>localhost.localdomain</hostname>
       <resolv_conf_policy>auto</resolv_conf_policy>
     </dns>
+    <interfaces config:type="list">
+      <interface>
+        <bootproto>dhcp</bootproto>
+        <name>link</name>
+        <startmode>auto</startmode>
+      </interface>
+    </interfaces>
   </networking>
   <services-manager t="map">
     <default_target>multi-user</default_target>

+ 21 - 0
control_plane/roles/provision_cobbler/tasks/provision_password.yml

@@ -107,6 +107,27 @@
         regexp: '^          install: http://ip/cblr/links/leap-x86_64/'
         replace: '          install: http://{{ hpc_ip }}/cblr/links/leap-x86_64/'
       tags: install
+
+    - name: Configure kickstart file leap - nic
+      lineinfile:
+        path: "{{ role_path }}/files/{{ cobbler_kickstart_file }}"
+        insertafter: '      </interface>'
+        line: >4
+                  <interface>
+                    <bootproto>dhcp</bootproto>
+                    <name>{{ item }}</name>
+                    <startmode>auto</startmode>
+                  </interface>
+      tags: install
+      with_items: "{{ centos_host_nic }}"
+
+    - name: Remove blank lines
+      lineinfile:
+        path: "{{ role_path }}/files/{{ cobbler_kickstart_file }}"
+        regexp: '^\s*$'
+        state: absent
+      changed_when: false
+      tags: install
   when: provision_os == os_supported_leap
 
 - name: Random phrase generation