I downloaded & installed the Galaxy role for cowsay as follows here:
ansible-galaxy install jsecchiero.cowsay --force
- downloading role 'cowsay', owned by jsecchiero
- downloading role from https://github.com/jsecchiero/ansible-cowsay/archive/master.tar.gz
- extracting jsecchiero.cowsay to /home/cloud-user/.ansible/roles/jsecchiero.cowsay
/usr/lib64/python3.6/tarfile.py:2221: RuntimeWarning: The default behavior of tarfile extraction has been changed to disallow common exploits (including CVE-2007-4559). By default, absolute/parent paths are disallowed and some mode bits are cleared. See https://access.redhat.com/articles/7004769 for more details.
RuntimeWarning)
- jsecchiero.cowsay (master) was installed successfully
Here is my playbook:
---
- hosts: localhost
become: yes
vars_prompt:
- name: cowsay_say
prompt: "Enter message"
private: no
roles:
- role: jsecchiero.cowsay
vars:
cowsay_say: "{{ cowsay_say }}"```
When I run the playbook, I get the following error:
```TASK [jsecchiero.cowsay : hello world] ***********************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/games/cowsay HELLO WORLD!", "delta": "0:00:00.002728", "end": "2024-06-20 13:49:54.354890", "msg": "non-zero return code", "rc": 127, "start": "2024-06-20 13:49:54.352162", "stderr": "/bin/sh: /usr/games/cowsay: No such file or directory", "stderr_lines": ["/bin/sh: /usr/games/cowsay: No such file or directory"], "stdout": "", "stdout_lines": []}
Am I not understanding this galaxy role module? I want to use it with a custom message in my playbook tasks but it’s failing for some odd reason.