Details
-
Type: Task
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Story Points:0.5
-
Epic Link:
-
Sprint:Spring 7 : 13 Apr to 24 Apr
Description
Upon running ansible-playbook main.yml on a control node, I get this error:
Ansible ec2-user $ ansible-playbook main.yml
ERROR! conflicting action statements: fail, display_skipped_hosts
The error appears to be in '/home/ec2-user/appstore-playbooks/Ansible/roles/deployEC2/tasks/main.yml': line 27, column 4, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: View all existing Ec2 instances
^ here
The control node appears to be correctly configured as I was able to run:
ansible-playbook -e 'vars_file=[redacted].yml ec2_name=Ansible AWS_REGION=us-east-1' just_the_facts.yml
and get the expected output.
ansible --version returns:
ansible 2.9.6
config file = /home/ec2-user/appstore-playbooks/Ansible/ansible.cfg
configured module search path = ['/home/ec2-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.6 (default, Feb 26 2020, 20:54:15) [GCC 7.3.1 20180712 (Red Hat 7.3.1-6)]
I was able to replicate the issue. Since we have standardized the ansible version now we might run into one of these again.
The reason for the issue was
the below tag and a module renaming.
display_skipped_hosts: no
Ansible has changed the names of some earlier modules before version 2.9 and possibly the old naming convention will be discontinued after Ansible 2.9, for some modules they have mentioned it on their site.
I have made the required change on the branch
https://bitbucket.org/chesterdias/chester-local-appstore-playbooks/branch/IGBF-2332#diff
Please review.