Returning from Bug#77302. Bad file descriptor

Dear Team,

I’m returning fro BUG # https://github.com/ansible/ansible/issues/77302

The issue is specific to a specific version of platform. On different version the code works fine.

On RedHat linux 7.9

$ ansible --version

ansible [core 2.12.3]

config file = /etc/ansible/ansible.cfg

configured module search path = [‘/home/u1220753/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]

ansible python module location = /home/u1220753/.local/lib/python3.8/site-packages/ansible

ansible collection location = /home/u1220753/.ansible/collections:/usr/share/ansible/collections

executable location = /usr/local/bin/ansible

python version = 3.8.12 (default, Mar 19 2022, 02:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

jinja version = 3.0.3

libyaml = True

Running the below play gives Bad File Descriptor issue.

I wish to get the listen-port printed while keeping in mind that the position of listen-port element may change in the array.

Hi,

if you look at the information you sent, you might notice that the task
that has the error is called "create YML for server name with Listen
port" (and it looks like it is a `shell` task), but you do not show
that task.

Also when you would actually look at the output, you could see that you
are trying to run

  echo AdminServer_httpport: 12400>>/web/aes/admin/playbooks/Migrator/wlsdatadump.yml

on the server. The error message `/bin/sh: 12400: Bad file descriptor`
gives you a pretty good hint at what goes wrong: you do not have a
space between 12400 and `>>`. Thus you are telling the shell that you
want to redirect file descriptor 12400 to the file
/web/aes/admin/playbooks/Migrator/wlsdatadump.yml.

Inserting a space should solve your problem.

Regards,
Felix