I've written a playbook using a tag feature so that I can control the execution of the playbook. The Playbook is correct syntax-wise.
ansible-playbook tags.yml --syntax-check
Gives no Error
However, when I run the playbook, I receive the following error
fatal: [controlnode]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Failure talking to yum: near \"telnet\": syntax error"}
Here is the complete playbook
---
- hosts: RHEL7
become: yes
connection: ssh
gather_facts: no
tasks:
- name: Installing packages
yum: pkg=['telnet','httpd','tree'] state=installed
tags:
- packages
- name: Verifying if those packages are installed properly
raw: rpm -qa --last | head -5 > /home/packages.log
tags:
- verification_packages