I'm using Python 3.10.1 and I've installed Ansible using PIP version 21.2.4
ansible --version
returns the following
ansible [core 2.12.1]
config file = /Users/user_name/Projects/support/ansible/ansible.cfg
configured module search path = ['/Users/user_name/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/user_name/.pyenv/versions/3.10.1/lib/python3.10/site-packages/ansible
ansible collection location = /Users/user_name/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/user_name/.pyenv/versions/3.10.1/bin/ansible
python version = 3.10.1 (main, Jan 3 2022, 06:39:07) [Clang 13.0.0 (clang-1300.0.29.30)]
jinja version = 3.0.3
libyaml = True
In my playbook, I'm able to run all of the tasks except for any shell
or command
module call which has the ignore errors directive.
Here's the offending entry:
- name: RBENV init
become_user: deploy
become: true
command:
chdir: /home/deploy/
cmd: rbenv init
ignore_errors: yes
Which returns:
FAILED! => {"changed": false, "msg": "Unsupported parameters for (ansible.legacy.command) module: ignore_errors. Supported parameters include: warn, strip_empty_ends, _uses_shell, argv, _raw_params, chdir, creates, stdin, removes, executable, stdin_add_newline."}
What's interesting is that if I remove ignore_errors: yes
the command executes but then chokes on the non-zero response rbenv init
returns.
I'm brand new to Ansible and and when I google that error message I get posts from like 5 and 6 years ago where the user is using an at the time outdated version of Ansible. Am I using the current version? How would I determine this?