Browse Source

Merge pull request #499 from DeepikaKrishnaiah/devel

Issue #498: Fix to set variables in remote nodes
Lucas A. Wilson 3 years ago
parent
commit
f36f0e6634

+ 2 - 1
roles/login_server/tasks/install_packages.yml

@@ -24,6 +24,7 @@
     src: "{{ resolv_conf_path }}"
     dest: "{{ temp_resolv_conf_path }}"
     mode: "{{ resolv_file_mode }}"
+    remote_src: yes
 
 - name: Add the domain name in /etc/resolv.conf
   replace:
@@ -39,4 +40,4 @@
     regexp: "# Generated by NetworkManager"
     replace: "# Generated by NetworkManager\nsearch {{ hostvars['127.0.0.1']['domain_name'] }}"
   when:
-    replace_output.msg | length == 0
+    replace_output.msg | length == 0

+ 8 - 2
roles/slurm_workers/tasks/main.yml

@@ -1,4 +1,4 @@
-#  Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
+#  Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -114,6 +114,9 @@
   with_items:
     - "{{ groups['compute'] }}"
   when: '"compute" in group_names'
+  delegate_to: "{{ item }}"
+  with_items:
+    - "{{ play_hosts }}"
 
 - name: Add login node core & socket info in slurm config file
   lineinfile:
@@ -127,6 +130,9 @@
   when:
     - hostvars["127.0.0.1"]["login_node_required"]
     - '"login_node" in group_names'
+  delegate_to: "{{ item }}"
+  with_items:
+    - "{{ play_hosts }}"
 
 - name: Update hostnames of compute node when ALL in partition nodes
   replace:
@@ -152,4 +158,4 @@
   fetch:
     src: "{{ slurm_confpth }}"
     dest: "{{ buffer_path }}"
-    flat: true
+    flat: true