Yumrepo is not being located in ansible 2.1 using Ansible Tower

448 views
Skip to first unread message

Aaron Axisa

unread,
Mar 21, 2016, 1:52:38 AM3/21/16
to Ansible Project

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.

Uditha Desilva

unread,
Mar 21, 2016, 5:41:48 AM3/21/16
to Ansible Project
Tower isn't using that version of Ansible, I believe it is still using Ansible 2.0 (or possibly earlier). I don't think using arbitrary versions of Ansible is supported with Tower.

Matt Martz

unread,
Mar 21, 2016, 9:08:00 AM3/21/16
to ansible...@googlegroups.com
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.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/95ce791b-cd04-437e-81bc-ca3ff9067e21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages