Discussion:
[ansible-project] Getting an undefined variable error in galaxy-role geerlingguy.repo-epel
Bob Brown
2015-07-20 18:04:17 UTC
Permalink
I'm trying to use galaxy roles for the first time and started with
installing the geerlingguy.logstash role on an Amazon Linux Instance.

It mostly seems to work, at least up until it gets to the repo-epel role

I"m getting:

TASK: [geerlingguy.repo-epel | Install EPEL repo.]
****************************
fatal: [ec2-54-237-72-83.compute-1.amazonaws.com] => One or more undefined
variables: 'dict object' has no attribute u'NA'

It appears that the value of "ansible_distribution_major_version" is
showing as "NA". I am using version 1.9.1 of ansible.

Do I need to restructure epel_release or perhaps manually set
ansible_distribution_major_version someplace?

In the defaults/main.yml it is showing

epel_release:
"4": 10
"5": 4
"6": 8
"7": 5

epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{ ansible_distribution_major_version
}}/{{ ansible_userspace_architecture }}{{ '/' if
ansible_distribution_major_version < '7' else '/e/' }}epel-release-{{
ansible_distribution_major_version }}-{{
epel_release[ansible_distribution_major_version] }}.noarch.rpm"
epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{
ansible_distribution_major_version }}"

I'm not sure how to adjust things to make it work correctly.


Any thoughts?


Bob
--
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-project+***@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/b9430967-1405-492a-8cb6-3d2b2149c27b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Greg DeKoenigsberg
2015-07-20 18:14:06 UTC
Permalink
Galaxy roles are maintained by individual contributors in the Ansible
community.

On the web page for each role, there's a link to the Github repo,
where you can contact the author directly. That would be my advice.

--g
Post by Bob Brown
I'm trying to use galaxy roles for the first time and started with
installing the geerlingguy.logstash role on an Amazon Linux Instance.
It mostly seems to work, at least up until it gets to the repo-epel role
TASK: [geerlingguy.repo-epel | Install EPEL repo.]
****************************
fatal: [ec2-54-237-72-83.compute-1.amazonaws.com] => One or more undefined
variables: 'dict object' has no attribute u'NA'
It appears that the value of "ansible_distribution_major_version" is showing
as "NA". I am using version 1.9.1 of ansible.
Do I need to restructure epel_release or perhaps manually set
ansible_distribution_major_version someplace?
In the defaults/main.yml it is showing
"4": 10
"5": 4
"6": 8
"7": 5
epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{
ansible_distribution_major_version }}/{{ ansible_userspace_architecture }}{{
'/' if ansible_distribution_major_version < '7' else '/e/' }}epel-release-{{
ansible_distribution_major_version }}-{{
epel_release[ansible_distribution_major_version] }}.noarch.rpm"
epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{
ansible_distribution_major_version }}"
I'm not sure how to adjust things to make it work correctly.
Any thoughts?
Bob
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b9430967-1405-492a-8cb6-3d2b2149c27b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Greg DeKoenigsberg
Ansible Community Guy

Find out why SD Times named Ansible
their #1 Company to Watch in 2015:
http://sdtimes.com/companies-watch-2015/
--
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-project+***@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/CAM1FbhFXoP%3DBesy2pRaDpMSBdoLbWQsM-mpu94VOy54QUkn6pw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Bob Brown
2015-07-21 16:26:37 UTC
Permalink
Thanks.

Logged an Issue a few days ago at:
https://github.com/geerlingguy/ansible-role-repo-epel/issues/11

Haven't heard anything yet.

Bob
Post by Greg DeKoenigsberg
Galaxy roles are maintained by individual contributors in the Ansible
community.
On the web page for each role, there's a link to the Github repo,
where you can contact the author directly. That would be my advice.
--g
Post by Bob Brown
I'm trying to use galaxy roles for the first time and started with
installing the geerlingguy.logstash role on an Amazon Linux Instance.
It mostly seems to work, at least up until it gets to the repo-epel role
TASK: [geerlingguy.repo-epel | Install EPEL repo.]
****************************
fatal: [ec2-54-237-72-83.compute-1.amazonaws.com] => One or more
undefined
Post by Bob Brown
variables: 'dict object' has no attribute u'NA'
It appears that the value of "ansible_distribution_major_version" is
showing
Post by Bob Brown
as "NA". I am using version 1.9.1 of ansible.
Do I need to restructure epel_release or perhaps manually set
ansible_distribution_major_version someplace?
In the defaults/main.yml it is showing
"4": 10
"5": 4
"6": 8
"7": 5
epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{
ansible_distribution_major_version }}/{{ ansible_userspace_architecture
}}{{
Post by Bob Brown
'/' if ansible_distribution_major_version < '7' else '/e/'
}}epel-release-{{
Post by Bob Brown
ansible_distribution_major_version }}-{{
epel_release[ansible_distribution_major_version] }}.noarch.rpm"
epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{
ansible_distribution_major_version }}"
I'm not sure how to adjust things to make it work correctly.
Any thoughts?
Bob
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b9430967-1405-492a-8cb6-3d2b2149c27b%40googlegroups.com
.
Post by Bob Brown
For more options, visit https://groups.google.com/d/optout.
--
Greg DeKoenigsberg
Ansible Community Guy
Find out why SD Times named Ansible
http://sdtimes.com/companies-watch-2015/
--
You received this message because you are subscribed to a topic in the
Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/ansible-project/rt24KtmcRNo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAM1FbhFXoP%3DBesy2pRaDpMSBdoLbWQsM-mpu94VOy54QUkn6pw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.
--
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-project+***@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/CAKu-374DErH1eO04NYrhmsrnvvB-axyNoh5KX4sQp%3DFAUGrftQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Scott Sturdivant
2015-07-21 17:10:29 UTC
Permalink
What's the output of "python -c 'import platform; print platform.dist()'"
executed on the target (ec2-54-237-72-83.compute-1.amazonaws.com)?
Post by Bob Brown
Thanks.
https://github.com/geerlingguy/ansible-role-repo-epel/issues/11
Haven't heard anything yet.
Bob
Post by Greg DeKoenigsberg
Galaxy roles are maintained by individual contributors in the Ansible
community.
On the web page for each role, there's a link to the Github repo,
where you can contact the author directly. That would be my advice.
--g
Post by Bob Brown
I'm trying to use galaxy roles for the first time and started with
installing the geerlingguy.logstash role on an Amazon Linux Instance.
It mostly seems to work, at least up until it gets to the repo-epel role
TASK: [geerlingguy.repo-epel | Install EPEL repo.]
****************************
fatal: [ec2-54-237-72-83.compute-1.amazonaws.com] => One or more
undefined
Post by Bob Brown
variables: 'dict object' has no attribute u'NA'
It appears that the value of "ansible_distribution_major_version" is
showing
Post by Bob Brown
as "NA". I am using version 1.9.1 of ansible.
Do I need to restructure epel_release or perhaps manually set
ansible_distribution_major_version someplace?
In the defaults/main.yml it is showing
"4": 10
"5": 4
"6": 8
"7": 5
epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{
ansible_distribution_major_version }}/{{ ansible_userspace_architecture
}}{{
Post by Bob Brown
'/' if ansible_distribution_major_version < '7' else '/e/'
}}epel-release-{{
Post by Bob Brown
ansible_distribution_major_version }}-{{
epel_release[ansible_distribution_major_version] }}.noarch.rpm"
epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{
ansible_distribution_major_version }}"
I'm not sure how to adjust things to make it work correctly.
Any thoughts?
Bob
--
You received this message because you are subscribed to the Google
Groups
Post by Bob Brown
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Bob Brown
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b9430967-1405-492a-8cb6-3d2b2149c27b%40googlegroups.com
.
Post by Bob Brown
For more options, visit https://groups.google.com/d/optout.
--
Greg DeKoenigsberg
Ansible Community Guy
Find out why SD Times named Ansible
http://sdtimes.com/companies-watch-2015/
--
You received this message because you are subscribed to a topic in the
Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/ansible-project/rt24KtmcRNo/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAM1FbhFXoP%3DBesy2pRaDpMSBdoLbWQsM-mpu94VOy54QUkn6pw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAKu-374DErH1eO04NYrhmsrnvvB-axyNoh5KX4sQp%3DFAUGrftQ%40mail.gmail.com
<https://groups.google.com/d/msgid/ansible-project/CAKu-374DErH1eO04NYrhmsrnvvB-axyNoh5KX4sQp%3DFAUGrftQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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-project+***@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/CAPcsqxkoF3H%3DFmzN-Pz1mq157o2sciCMUDgWCX%2BysmzwrDcDAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Bob Brown
2015-07-27 05:21:49 UTC
Permalink
Python 2.7.9 (default, Apr 1 2015, 18:18:03)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Post by Scott Sturdivant
Post by Bob Brown
Post by Scott Sturdivant
import platform
print platform.dist()
('', '', '')
On Tue, Jul 21, 2015 at 10:10 AM, Scott Sturdivant <
Post by Scott Sturdivant
What's the output of "python -c 'import platform; print platform.dist()'"
executed on the target (ec2-54-237-72-83.compute-1.amazonaws.com)?
Post by Bob Brown
Thanks.
https://github.com/geerlingguy/ansible-role-repo-epel/issues/11
Haven't heard anything yet.
Bob
Post by Scott Sturdivant
Galaxy roles are maintained by individual contributors in the Ansible
community.
On the web page for each role, there's a link to the Github repo,
where you can contact the author directly. That would be my advice.
--g
Post by Bob Brown
I'm trying to use galaxy roles for the first time and started with
installing the geerlingguy.logstash role on an Amazon Linux Instance.
It mostly seems to work, at least up until it gets to the repo-epel
role
Post by Bob Brown
TASK: [geerlingguy.repo-epel | Install EPEL repo.]
****************************
fatal: [ec2-54-237-72-83.compute-1.amazonaws.com] => One or more
undefined
Post by Bob Brown
variables: 'dict object' has no attribute u'NA'
It appears that the value of "ansible_distribution_major_version" is
showing
Post by Bob Brown
as "NA". I am using version 1.9.1 of ansible.
Do I need to restructure epel_release or perhaps manually set
ansible_distribution_major_version someplace?
In the defaults/main.yml it is showing
"4": 10
"5": 4
"6": 8
"7": 5
epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{
ansible_distribution_major_version }}/{{
ansible_userspace_architecture }}{{
Post by Bob Brown
'/' if ansible_distribution_major_version < '7' else '/e/'
}}epel-release-{{
Post by Bob Brown
ansible_distribution_major_version }}-{{
epel_release[ansible_distribution_major_version] }}.noarch.rpm"
epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{
ansible_distribution_major_version }}"
I'm not sure how to adjust things to make it work correctly.
Any thoughts?
Bob
--
You received this message because you are subscribed to the Google
Groups
Post by Bob Brown
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Bob Brown
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b9430967-1405-492a-8cb6-3d2b2149c27b%40googlegroups.com
.
Post by Bob Brown
For more options, visit https://groups.google.com/d/optout.
--
Greg DeKoenigsberg
Ansible Community Guy
Find out why SD Times named Ansible
http://sdtimes.com/companies-watch-2015/
--
You received this message because you are subscribed to a topic in the
Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/ansible-project/rt24KtmcRNo/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAM1FbhFXoP%3DBesy2pRaDpMSBdoLbWQsM-mpu94VOy54QUkn6pw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAKu-374DErH1eO04NYrhmsrnvvB-axyNoh5KX4sQp%3DFAUGrftQ%40mail.gmail.com
<https://groups.google.com/d/msgid/ansible-project/CAKu-374DErH1eO04NYrhmsrnvvB-axyNoh5KX4sQp%3DFAUGrftQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/ansible-project/rt24KtmcRNo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAPcsqxkoF3H%3DFmzN-Pz1mq157o2sciCMUDgWCX%2BysmzwrDcDAQ%40mail.gmail.com
<https://groups.google.com/d/msgid/ansible-project/CAPcsqxkoF3H%3DFmzN-Pz1mq157o2sciCMUDgWCX%2BysmzwrDcDAQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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-project+***@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/CAKu-376CnVa6QbwX%3DG8SX_R4cdxRihDX92J_zpU-Z6KFE9wOXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
The Pax
2015-07-22 11:05:51 UTC
Permalink
ansible_distribution_major_version is a fact. Just don't disable gathering
facts.
Post by Bob Brown
I'm trying to use galaxy roles for the first time and started with
installing the geerlingguy.logstash role on an Amazon Linux Instance.
It mostly seems to work, at least up until it gets to the repo-epel role
TASK: [geerlingguy.repo-epel | Install EPEL repo.]
****************************
fatal: [ec2-54-237-72-83.compute-1.amazonaws.com] => One or more
undefined variables: 'dict object' has no attribute u'NA'
It appears that the value of "ansible_distribution_major_version" is
showing as "NA". I am using version 1.9.1 of ansible.
Do I need to restructure epel_release or perhaps manually set
ansible_distribution_major_version someplace?
In the defaults/main.yml it is showing
"4": 10
"5": 4
"6": 8
"7": 5
epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{ ansible_distribution_major_version
}}/{{ ansible_userspace_architecture }}{{ '/' if
ansible_distribution_major_version < '7' else '/e/' }}epel-release-{{
ansible_distribution_major_version }}-{{
epel_release[ansible_distribution_major_version] }}.noarch.rpm"
epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{
ansible_distribution_major_version }}"
I'm not sure how to adjust things to make it work correctly.
Any thoughts?
Bob
--
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-project+***@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/0492e000-ea76-461b-8f46-5f500b64e877%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...