I am trying to uninstall a application using ansible. This is my playbook
stdout_lines is plural so it means that you can have many lines and each line is an element in a list. So [:40] means only use the 40 first element/lines.
Why don't you use the yum module with state: absent?