yumrepo was renamed to yum_repository somewhat recently. You will need to use yum_repository instead. My guess is the docs haven't been updated yet.
On Sunday, March 20, 2016, Aaron Axisa <[email protected]> wrote: > > I am trying to use yumrepo > https://docs.ansible.com/ansible/yumrepo_module.html > and it states that it is new in version 2.1 > > So i went ahead and updated ansible on my ansible tower machine: > > sudo yum -y install git asciidoc rpm-build python2-devel > cd ~ > git clone git://github.com/ansible/ansible.git --recursive > cd ansible > > make rpm > > sudo yum -y install rpm-build/ansible-2.1.0-0.git201603201549.6824f3a. > devel.el7.centos.noarch.rpm > > So now when I run ansible --version I get the following: > ansible 2.1.0 > config file = /etc/ansible/ansible.cfg > configured module search path = Default w/o overrides > > > Now when I try to run my playbook (particularly this command in my role) : > > > - name: Add GOsa2 Repo > yumrepo: > name: GOsa Repository > baseurl: http://oss.gonicus.de/pub/gosa/redhat > gpgcheck: no > enabled: yes > > > > Ansible Tower 2.4.4 complains with the following error: > > Using /etc/ansible/ansible.cfg as config file SSH password: SUDO > password[defaults to SSH password]: ERROR! no action detected in task. > This often indicates a misspelled module name, or incorrect module path. > The error appears to have been in > '/var/lib/awx/projects/_8__my_repo/ansible/roles/gosa/tasks/main.yml': line > 17, column 3, but may be elsewhere in the file depending on the exact > syntax problem. The offending line appears to be: - name : Add GOsa2 Repo ^ > here The error appears to have been in > '/var/lib/awx/projects/_8__my_repo/ansible/roles/gosa/tasks/main.yml': line > 17, column 3, but may be elsewhere in the file depending on the exact > syntax problem. The offending line appears to be: - name : Add GOsa2 Repo ^ > here > > > > Can anyone help me with this as I don't have any clue why it's not > detecting yumrepo at this point. > > -- > 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:_e(%7B%7D,'cvml','ansible-project%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/95ce791b-cd04-437e-81bc-ca3ff9067e21%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/95ce791b-cd04-437e-81bc-ca3ff9067e21%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v8MDYXN3ZZR1YSWdXPMHug1ijwX0%3Di9m9hzSy3REPAvgg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
