Also the 'when' directive is indented too far, I think.
Try like this
- name: install tomcat7 from rhel-x86_64-server-6-datacenter-tomcat-grid-
apps
package:
name: apache-tomcat-7.0.81
state: present
when: ansible_distribution_major_version == "6"
ignore_errors: yes
On Friday, July 24, 2020 at 4:44:17 PM UTC+1, Dick Visser wrote:
>
> ignore_errors is too far intended
>
>
> On Fri, 24 Jul 2020 at 17:40, Amar Subudhi <[email protected]
> <javascript:>> wrote:
>
>> Please help on the below error
>>
>> Ansible Codes
>> ---
>> # tomcat7 role
>> - name: install tomcat7 from
>> rhel-x86_64-server-6-datacenter-tomcat-grid-apps
>> package:
>> name: apache-tomcat-7.0.81
>> when: ansible_distribution_major_version == "6"
>> ignore_errors: yes
>> state: present
>>
>> # tomcat7 role
>> - name: install tomcat7 from
>> rhel-x86_64-server-7-datacenter-tomcat-grid-apps
>> package:
>> name: apache-tomcat-7.0.76
>> when: ansible_distribution_major_version == "7"
>> ignore_errors: yes
>> state: present
>>
>> Error
>> TASK [tomcat7 : install tomcat7 from
>> rhel-x86_64-server-6-datacenter-tomcat-grid-apps]
>> ******************************************************************************************************************************************************
>> Friday 24 July 2020 11:13:06 -0400 (0:00:01.013) 0:05:50.522
>> ***********
>> fatal: [hsdm0402]: FAILED! => {"changed": false, "msg": "Unsupported
>> parameters for (yum) module: ignore_errors, when Supported parameters
>> include: allow_downgrade, bugfix, conf_file, disable_gpg_check,
>> disable_plugin, disablerepo, enable_plugin, enablerepo, exclude,
>> install_repoquery, installroot, list, name, security, skip_broken, state,
>> update_cache, update_only, validate_certs"}
>> to retry, use: --limit
>> @/opt/hd/sh/srv/ansible/development/axs8u3p/hadoop/site.retry
>>
>> --
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/2c25ffaf-f296-40ea-9b83-9d333ec76bdfo%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/2c25ffaf-f296-40ea-9b83-9d333ec76bdfo%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5f81eef9-6f90-47b6-94c7-05218573745fo%40googlegroups.com.