From 49f0a2ce6b3e8ad7f0b13a360336d85c176eb15f Mon Sep 17 00:00:00 2001 From: ThePCGeek Date: Sat, 25 Mar 2023 21:41:04 -0400 Subject: [PATCH] (fix): correct var (#262) var registered for rc.local check is rcfile but under when it said rclocal which was undefined. changed to rcfile to correct. --- roles/reset/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index b9cdd6e..cd3bf72 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -67,18 +67,18 @@ content: "{{ lookup('template', 'templates/rc.local.j2') }}" create: false state: absent - when: proxmox_lxc_configure and rclocal.stat.exists + when: proxmox_lxc_configure and rcfile.stat.exists - name: Check rc.local for cleanup become: true slurp: src: /etc/rc.local register: rcslurp - when: proxmox_lxc_configure and rclocal.stat.exists + when: proxmox_lxc_configure and rcfile.stat.exists - name: Cleanup rc.local if we only have a Shebang line become: true file: path: /etc/rc.local state: absent - when: proxmox_lxc_configure and rclocal.stat.exists and ((rcslurp.content | b64decode).splitlines() | length) <= 1 + when: proxmox_lxc_configure and rcfile.stat.exists and ((rcslurp.content | b64decode).splitlines() | length) <= 1