Playbook wasn't using then user variable to format the command.

This commit is contained in:
savagebidoof 2024-01-17 10:41:29 +01:00
parent a9b93c6407
commit 54147126fb

View File

@ -1,6 +1,6 @@
# https://stackoverflow.com/questions/46515704/how-to-kill-a-running-process-using-ansible
- name: Get running processes
shell: "ps -ef | grep -v grep | grep -w ^orangepi | awk '{print $2}'"
shell: "ps -ef | grep -v grep | grep -w ^{{ orangepi }} | awk '{print $2}'"
register: running_processes
when: delete_user_name is defined and delete_user_name | length > 0