From ddc803b5fa838ed94e17d7f85e921658a7ba6fd8 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 7 Dec 2018 18:03:52 -0500 Subject: [PATCH] generate-fog-csv: Support defining alternative install drive Signed-off-by: David Galloway --- tools/generate-fog-csv.yml | 2 ++ tools/roles/generate-fog-csv/templates/csv.j2 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/generate-fog-csv.yml b/tools/generate-fog-csv.yml index c8594483..a1d72cbd 100644 --- a/tools/generate-fog-csv.yml +++ b/tools/generate-fog-csv.yml @@ -2,6 +2,8 @@ # This playbook can be used to generate a CSV file of testnodes # that can be imported to the FOG web UI. # It outputs a CSV file to /tmp/fog_hostfile.csv +# +# Define 'fog_install_drive: "/dev/sdX"' in ansible group_vars if it should be any drive other than sda - hosts: localhost roles: diff --git a/tools/roles/generate-fog-csv/templates/csv.j2 b/tools/roles/generate-fog-csv/templates/csv.j2 index fcde698e..67947b5a 100644 --- a/tools/roles/generate-fog-csv/templates/csv.j2 +++ b/tools/roles/generate-fog-csv/templates/csv.j2 @@ -1,3 +1,3 @@ {% for host in groups['cobbler_managed'] %} -"{{ hostvars[host]['mac'] }}","{{ hostvars[host]['inventory_hostname_short'] }}","","","1","0","","","fog","","","","","","","","","{{ hostvars[host]['kernel_options'] }}","","/dev/sda","","","","","0000-00-00 00:00:00","110","","","" +"{{ hostvars[host]['mac'] }}","{{ hostvars[host]['inventory_hostname_short'] }}","","","1","0","","","fog","","","","","","","","","{{ hostvars[host]['kernel_options'] }}","","{{ hostvars[host]['fog_install_drive']|default('/dev/sda') }}","","","","","0000-00-00 00:00:00","110","","","" {% endfor %} -- 2.47.3