From cffd946e29bcf69de2562e6cbcc90810fc4a18a1 Mon Sep 17 00:00:00 2001
From: Eesaan Atluri <atlurie@uab.edu>
Date: Tue, 27 Sep 2022 14:53:52 +0000
Subject: [PATCH] Parameterize the package list file path.

---
 ansible/group_vars/all                   | 3 +++
 ansible/roles/cheaha.node/tasks/main.yml | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 ansible/group_vars/all

diff --git a/ansible/group_vars/all b/ansible/group_vars/all
new file mode 100644
index 0000000..0389382
--- /dev/null
+++ b/ansible/group_vars/all
@@ -0,0 +1,3 @@
+---
+  #This file path is relative to the ansible playbook.
+  pkg_list_file: "cheaha-compute-yum-pkg-list.txt"
diff --git a/ansible/roles/cheaha.node/tasks/main.yml b/ansible/roles/cheaha.node/tasks/main.yml
index b0aab77..0ce4079 100644
--- a/ansible/roles/cheaha.node/tasks/main.yml
+++ b/ansible/roles/cheaha.node/tasks/main.yml
@@ -63,7 +63,7 @@
   yum:
     name: "{{ item }}"
     state: present
-  loop: "{{ lookup('file', 'cheaha-compute-yum-pkg-list.txt').splitlines() }}"
+  loop: "{{ lookup('file', '{{ pkg_list_file }}').splitlines() }}"
 
 - name: Update nsswitch.conf to look for ldap
   ansible.builtin.replace:
-- 
GitLab