(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.
This commit is contained in:
ThePCGeek 2023-03-25 21:41:04 -04:00 committed by GitHub
parent 6c4621bd56
commit 49f0a2ce6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,18 +67,18 @@
content: "{{ lookup('template', 'templates/rc.local.j2') }}" content: "{{ lookup('template', 'templates/rc.local.j2') }}"
create: false create: false
state: absent state: absent
when: proxmox_lxc_configure and rclocal.stat.exists when: proxmox_lxc_configure and rcfile.stat.exists
- name: Check rc.local for cleanup - name: Check rc.local for cleanup
become: true become: true
slurp: slurp:
src: /etc/rc.local src: /etc/rc.local
register: rcslurp 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 - name: Cleanup rc.local if we only have a Shebang line
become: true become: true
file: file:
path: /etc/rc.local path: /etc/rc.local
state: absent 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