I am new to Ansible and have been trying to write a playbook that adds the EPEL repo to the list of repos available.The playbook I have is:  - hosts: all  # define variables.  vars:    epelReleaseMajorVersion: 7    epelReleaseMinorVersion: 8  tasks:    - name: add epel repo      yum-repository:        name: add epel repo        description: EPEL YUM repo        baseurl:  http://dl.fedoraproject.org/pub/epel/$epelReleaseMajorVersion/x86_64/e/epel-release-$epelReleaseMajorVersion-$epelReleaseMinorVersion.noarch.rpm        tags: addEpelRepoI am trying to run this playbook like so:ansible-playbook -v -i localhost, -c local serverSetup.yml and get the following error:  ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.The error appears to have been in '/root/ansible/playbooks/serverSetup.yml': line 21, column 7, but maybe elsewhere in the file depending on the exact syntax problem.The offending line appears to be:  tasks:    - name: add epel repo      ^ hereMy questions:1. Am I using the variables epelReleaseMajorVersion etc. correctly?2. How do I solve for this error? I have been taking a look at the docs but there do not seem to be many examples.
Updating yum repo in RHEL 7 with Ansible
rhel;yum;ansible
Refer to https://docs.ansible.com/ansible/yum_repository_module.htmlYour code should be- hosts: all  # define variables.  vars:    epelReleaseMajorVersion: 7    epelReleaseMinorVersion: 8  tasks:    - name: add epel repo      yum_repository:        name: epel_repo        description: EPEL YUM repo        baseurl:  http://dl.fedoraproject.org/pub/epel/{{epelReleaseMajorVersion}}/x86_64/So you misspelled the name of the module. Baseurl was wrong. Variable reference was wrong. And yum_repository ansible module does not have any parameter called tags 