From 601954fe7c020e1895d51b9a6f05abfdafcf5463 Mon Sep 17 00:00:00 2001 From: Trey Blancher Date: Wed, 11 Mar 2026 14:15:04 -0400 Subject: [PATCH] Refactor to be a bit more modular --- build_needs_reboot.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_needs_reboot.yml b/build_needs_reboot.yml index a601fdd..055b2fe 100644 --- a/build_needs_reboot.yml +++ b/build_needs_reboot.yml @@ -1,5 +1,5 @@ - name: Create test script to determine if reboot is necessary - hosts: all + hosts: arch debian firewall tasks: - name: Create ~/bin if it doesn't already exist ansible.builtin.shell: @@ -12,11 +12,11 @@ print '#!/usr/bin/env zsh' > needs_reboot source ~/.zsh_functions declare -f kernel_func >> needs_reboot - perl -pi -e 'if (/OK/) { $_ = "false\n" }' needs_reboot - perl -pi -e 'if (/needs reboot/) { $_ = "true\n" }' needs_reboot + perl -pi -e 'if (/OK/) { $_ = "\t\techo no\n" }' needs_reboot + perl -pi -e 'if (/needs reboot/) { $_ = "\t\techo yes\n" }' needs_reboot printf "\n\n\nkernel_func\n" >> needs_reboot chmod +x needs_reboot args: - creates: needs_reboot + #creates: needs_reboot executable: /usr/bin/zsh chdir: ~/bin/