# need explaination

**URL:** <https://forum.ansible.com/t/need-explaination/17886>\
**Category:** Ansible Project\
**Tags:** fedora\
**Created:** [April 1, 2015, 5:19pm UTC](https://forum.ansible.com/t/need-explaination/17886 "2015-04-01T17:19:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 1, 2015, 5:19pm UTC](https://forum.ansible.com/t/need-explaination/17886/1 "2015-04-01T17:19:31Z")

</div>

I know this is really really basic question, but I really want the explanation of this:

repos:

- name: ‘EPEL’  
url: ‘[http://download.fedoraproject.org/pub/epel/6/x86\_64/epel-release-6-8.noarch.rpm](http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm)’  
key: ‘[http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6](http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6)’
- name: ‘RPMForge’  
url: ‘[http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86\_64.rpm](http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm)’  
key: ‘[http://apt.sw.be/RPM-GPG-KEY.dag.txt](http://apt.sw.be/RPM-GPG-KEY.dag.txt)’
- name: ‘Remi’  
url: ‘[http://rpms.famillecollet.com/enterprise/remi-release-6.rpm](http://rpms.famillecollet.com/enterprise/remi-release-6.rpm)’  
key: ‘[http://rpms.famillecollet.com/RPM-GPG-KEY-remi](http://rpms.famillecollet.com/RPM-GPG-KEY-remi)’
- name: ‘Webtatic’  
url: ‘[http://mirror.webtatic.com/yum/el6/latest.rpm](http://mirror.webtatic.com/yum/el6/latest.rpm)’  
key: ‘[http://mirror.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy](http://mirror.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy)’

Like what is “repo”, I think it’s the list? but what is the “name”, “url” and “key”? and why only “name” has the “-” infront of it?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Ivan\_S\_Freitas](https://avatars.discourse-cdn.com/v4/letter/i/e99b99/32.png) [@Ivan\_S\_Freitas](https://forum.ansible.com/u/Ivan_S_Freitas)\
**Post date:** [April 1, 2015, 5:43pm UTC](https://forum.ansible.com/t/need-explaination/17886/2 "2015-04-01T17:43:11Z")

</div>

This is the yaml representation of a list of dictionaries. I strongly  
recommend you to study the yaml specificiation [1], but this specific  
example can be broken down as this:

"repo" is a variable. Since the elements that follow it start with a  
dash, "repo" represents a list. Each dash starts a list element, and  
all subelements in the same level of indentation are the part of the  
same list element. So each group of "name", "url" and "key" belong to  
the same list element.

Each list element is a dictionary. "name", "url" and "key" are the  
keys, and after the ":" are their respective values. One way that can  
help you understand a yaml document is to install the pyyaml library  
and try to parse it with python:

> > > import yaml  
> > > yaml.load('''

... repos:  
... - name: 'EPEL'  
... url: '[http://download.fedoraproject.org/pub/epel/6/x86\_64/epel-release-6-8.noarch.rpm](http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm)’  
... key: '[http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6](http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6)’  
... - name: 'RPMForge'  
... url: '[http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86\_64.rpm](http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm)’  
... key: '[http://apt.sw.be/RPM-GPG-KEY.dag.txt](http://apt.sw.be/RPM-GPG-KEY.dag.txt)’  
... - name: 'Remi'  
... url: '[http://rpms.famillecollet.com/enterprise/remi-release-6.rpm](http://rpms.famillecollet.com/enterprise/remi-release-6.rpm)’  
... key: '[http://rpms.famillecollet.com/RPM-GPG-KEY-remi](http://rpms.famillecollet.com/RPM-GPG-KEY-remi)’  
... - name: 'Webtatic'  
... url: '[http://mirror.webtatic.com/yum/el6/latest.rpm](http://mirror.webtatic.com/yum/el6/latest.rpm)’  
... key: '[http://mirror.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy](http://mirror.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy)’  
... ''')  
{'repos': [{'url':  
'[http://download.fedoraproject.org/pub/epel/6/x86\_64/epel-release-6-8.noarch.rpm](http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm)’,  
'name': 'EPEL', 'key': '[http://ftp.riken.jp/Linux/fedora/epel/RPM-GP](http://ftp.riken.jp/Linux/fedora/epel/RPM-GP)  
G-KEY-EPEL-6'}, {'url':  
'[http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86\_64.rpm](http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm)’,  
'name': 'RPMForge', 'key': '[http://apt.sw.be/RPM-GPG-KEY](http://apt.sw.be/RPM-GPG-KEY).  
dag.txt'}, {'url':  
'[http://rpms.famillecollet.com/enterprise/remi-release-6.rpm](http://rpms.famillecollet.com/enterprise/remi-release-6.rpm)’, 'name':  
'Remi', 'key': '[http://rpms.famillecollet.com/RPM-GPG-KEY-remi](http://rpms.famillecollet.com/RPM-GPG-KEY-remi)’},  
{'url': 'http:  
//mirror.webtatic.com/yum/el6/latest.rpm', 'name': 'Webtatic', 'key':  
'[http://mirror.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy](http://mirror.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy)’}]}

> > >

Hope it helps.

[1] [http://yaml.org/](http://yaml.org/)
