I got this error for below code - FAILED! => {"msg": "template error while templating string: expected token 'end of print statement', got '='. String: {{ var=oom.stdout }}"}
Please suggest , i am trying to get pid from shell cmd & then update it with echo - hosts: temp > gather_facts: yes > become: yes > remote_user: root > tasks: > - name: Capture uname ouput > shell: "uname" > register: os_type > - name: Adjust OOM to negative so that OOM killer does not kill below > processes > shell: 'ps -ef|egrep > "sssd|wdmd|portreserve|autofs|automount|ypbind|rpcbind|rpc.statd|rpc.mountd|rpc.idampd|ntpd|lmgrd|Xvnc|vncconfig|irqblance|rpc.rquotad|metric|nscd|crond|snpslmd|getpwname.pl|mysqld|rsyslogd|xinetd|sendmail|lsf|tigervnc|tightvnc|cfadm" > > |egrep -ve "ps|egrep" |awk "{print \$2}"' > register: oom > when: os_type.stdout == 'Linux' > - debug: var=oom.stdout > - name: update the pid > raw: echo -17 > /proc/{{ item.pid }}/oom_adj > with_items: > - "{{ var=oom.stdout }}" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/620d6682-3345-4069-a31d-78d53924c3aa%40googlegroups.com.