ansible_distribution_major_version is a fact. Just don't disable gathering 
facts.

On Monday, July 20, 2015 at 9:04:17 PM UTC+3, Bob Brown wrote:
>
> 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 [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/0492e000-ea76-461b-8f46-5f500b64e877%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to