From 148db68de3304412aeff43e38f0cde4e08a777c7 Mon Sep 17 00:00:00 2001 From: Tom Lin Date: Tue, 1 Oct 2024 00:06:23 +0100 Subject: [PATCH] Make kernarg optional Fix user import debug task --- playbook-task-sync-users.yml | 3 +-- templates/nodes.conf.j2 | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/playbook-task-sync-users.yml b/playbook-task-sync-users.yml index 329b164..c1293dd 100644 --- a/playbook-task-sync-users.yml +++ b/playbook-task-sync-users.yml @@ -53,8 +53,7 @@ - name: Debug and print existing_users debug: - var: users_to_delete - msg: "Run with --extra-vars=delete_users=true to delete these users" + msg: "Users: \n{{users_to_delete}}\nRun with --extra-vars=delete_users=true to delete these users" when: delete_users is undefined - name: "Drop absent users" diff --git a/templates/nodes.conf.j2 b/templates/nodes.conf.j2 index d4506b4..6f4f1bd 100644 --- a/templates/nodes.conf.j2 +++ b/templates/nodes.conf.j2 @@ -22,8 +22,10 @@ nodes: ipaddr: {{vars.mgmt_ip}} interface: lanplus {% endif %} +{% if vars.kernargs is defined %} kernel: args: {{vars.kernargs}} +{% endif %} network devices: default: hwaddr: {{vars.mac}}