Browse Source

Issue #236: #237: #238: #239: Fixed ansible-lint warnings

Signed-off-by: blesson-james <blesson_james@Dellteam>
John Lockman 4 years ago
parent
commit
d330a81858

+ 5 - 5
.github/workflows/ansible-lint.yml

@@ -17,7 +17,7 @@ jobs:
 
     - name: ansible-lint 
       # replace "master" with any valid ref
-      uses: ansible/ansible-lint-action@151b9a2
+      uses: ansible/ansible-lint-action@master
       with:
         # [required]
         # Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
@@ -28,10 +28,10 @@ jobs:
         #   playbook_1.yml
         #   playbook_2.yml
         targets: |
-          /github/workspace/kubernetes/jupyterhub.yml
-          /github/workspace/kubernetes/kubeflow.yml
-          /github/workspace/kubernetes/kubernetes.yml
-          /github/workspace/slurm/slurm.yml
+          /github/workspace/omnia.yml
+          /github/workspace/omnia_config.yml
+          /github/workspace/platforms/jupyterhub.yml
+          /github/workspace/platforms/kubeflow.yml
           /github/workspace/tools/install_tools.yml
         # [optional]
         # Arguments to override a package and its version to be set explicitly.

+ 1 - 0
roles/cluster_validation/tasks/fetch_password.yml

@@ -29,6 +29,7 @@
       {{ vault_key }}
     owner: root
     force: yes
+    mode: '0755'
   when: not vault_key_result.stat.exists
 
 - name: Check if omnia config file is encrypted

+ 10 - 10
roles/common/tasks/amd.yml

@@ -13,23 +13,23 @@
 #  limitations under the License.
 ---
 
-- name: Add AMD ROCm repository 
+- name: Add AMD ROCm repository
   yum_repository:
-    name: ROCm 
-    description: AMD GPU ROCm Repository 
-    baseurl: https://repo.radeon.com/rocm/yum/rpm 
-    gpgcheck: yes 
-    gpgkey: https://repo.radeon.com/rocm/rocm.gpg.key 
+    name: ROCm
+    description: AMD GPU ROCm Repository
+    baseurl: https://repo.radeon.com/rocm/yum/rpm
+    gpgcheck: yes
+    gpgkey: https://repo.radeon.com/rocm/rocm.gpg.key
     enabled: yes
   tags: install
 
-- name: Install AMD ROCm drivers 
+- name: Install AMD ROCm drivers
   package:
-    name: rocm-dkms 
-    enablerepo: ROCm 
+    name: rocm-dkms
+    enablerepo: ROCm
     state: present
   tags: install
 
 - name: Reboot after installing GPU drivers
   reboot:
-  tags: install
+  tags: install

+ 8 - 4
roles/k8s_start_services/tasks/main.yml

@@ -99,7 +99,7 @@
     -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
   changed_when: true
   tags: init
-  
+
 - name: Copy the slurm exporter config file
   copy:
     src: "{{ slurm_exporter_config_file }}"
@@ -107,11 +107,15 @@
     owner: root
     group: root
     mode: "{{ slurm_exporter_file_mode }}"
+  tags: init
 
 - name: Fetch the public IP of the host
-  shell: ip route get 8.8.8.8 | awk '{print $7}'
+  shell: >
+    set -o pipefail && \
+      ip route get 8.8.8.8 | awk '{print $7}'
   register: public_ip
   changed_when: False
+  tags: init
 
 - name: Add the host IP to config file
   replace:
@@ -159,5 +163,5 @@
   command: "kubectl create -f '{{ rocm_device_plugin_yaml_url }}'"
   changed_when: true
   register: amd_gpu_enable
-  when: "'amdgpu-device-plugin' not in k8s_pods.stdout" 
-  tags: init
+  when: "'amdgpu-device-plugin' not in k8s_pods.stdout"
+  tags: init

+ 1 - 1
roles/slurm_start_services/tasks/main.yml

@@ -24,7 +24,7 @@
     src: "{{ buffer_path }}"
     dest: "{{ slurm_confpth }}"
     mode: "{{ slurm_mode }}"
- 
+
 - name: Add compute hosts info in hosts file
   lineinfile:
     dest: "{{ hosts_dest }}"

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

@@ -115,14 +115,14 @@
 
 - name: Set compute node hostname/host ip to add in manager hosts file
   set_fact:
-    compute_host: "{{ inventory_hostname }}" 
+    compute_host: "{{ inventory_hostname }}"
     compute_ip: "{{ machine_name.stdout }}"
 
 - name: Get socket and core info from compute nodes
   set_fact:
     node_name: "{{ machine_name.stdout }}"
     sockets: "{{ hostvars[inventory_hostname]['ansible_facts']['processor_count'] }}"
-    cores: "{{ hostvars[inventory_hostname]['ansible_facts']['processor_cores'] }}"  
+    cores: "{{ hostvars[inventory_hostname]['ansible_facts']['processor_cores'] }}"
 
 - name: Add compute nodes core & socket info in slurm config file
   lineinfile: