<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">yum_repository</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">2.3.1.0</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Control host: Fedora 26<br>
Servers: CentOS 7.3</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Some public Yum repositories use multiple GPG keys and yum_repository does not support that currently.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    - name: Enable Kubernetes yum repository
      yum_repository:
        name: kubernetes
        description: Kubernetes
        baseurl: https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
        enabled: yes
        gpgcheck: yes
        repo_gpgcheck: yes
        gpgkey: 
          - https://packages.cloud.google.com/yum/doc/yum-key.gpg
          - https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
        state: present"><pre class="notranslate">    - <span class="pl-ent">name</span>: <span class="pl-s">Enable Kubernetes yum repository</span>
      <span class="pl-ent">yum_repository</span>:
        <span class="pl-ent">name</span>: <span class="pl-s">kubernetes</span>
        <span class="pl-ent">description</span>: <span class="pl-s">Kubernetes</span>
        <span class="pl-ent">baseurl</span>: <span class="pl-s">https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64</span>
        <span class="pl-ent">enabled</span>: <span class="pl-s">yes</span>
        <span class="pl-ent">gpgcheck</span>: <span class="pl-s">yes</span>
        <span class="pl-ent">repo_gpgcheck</span>: <span class="pl-s">yes</span>
        <span class="pl-ent">gpgkey</span>: 
          - <span class="pl-s">https://packages.cloud.google.com/yum/doc/yum-key.gpg</span>
          - <span class="pl-s">https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg</span>
        <span class="pl-ent">state</span>: <span class="pl-s">present</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Multiple entries would be added for the "gpgkey" key in the Yum repository configuration.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg"><pre class="notranslate"><code class="notranslate">gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gpgkey = ['https://packages.cloud.google.com/yum/doc/yum-key.gpg', 'https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg']"><pre class="notranslate"><code class="notranslate">gpgkey = ['https://packages.cloud.google.com/yum/doc/yum-key.gpg', 'https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg']
</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0
  config file = ansible.cfg
  configured module search path = [u'modules']
  python version = 2.7.13 (default, Jun  9 2017, 12:31:00) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0
  config file = ansible.cfg
  configured module search path = [u'modules']
  python version = 2.7.13 (default, Jun  9 2017, 12:31:00) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<h5 dir="auto">OS / ENVIRONMENT</h5>

<h5 dir="auto">SUMMARY</h5>

<p dir="auto">Serializer seems to convert 1_ to 1 as a dictionary key</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- hosts: localhost
  connection: local
  tasks:
    - debug:
        var: my_dict
  vars:
    my_dict:
      0_9_2: value
      1_1_0: value1
      0000001: value2
      1_: value3
      12: value4"><pre class="notranslate">- <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span>
  <span class="pl-ent">connection</span>: <span class="pl-s">local</span>
  <span class="pl-ent">tasks</span>:
    - <span class="pl-ent">debug</span>:
        <span class="pl-ent">var</span>: <span class="pl-s">my_dict</span>
  <span class="pl-ent">vars</span>:
    <span class="pl-ent">my_dict</span>:
      <span class="pl-ent">0_9_2</span>: <span class="pl-s">value</span>
      <span class="pl-ent">1_1_0</span>: <span class="pl-s">value1</span>
      <span class="pl-ent">0000001</span>: <span class="pl-s">value2</span>
      <span class="pl-ent">1_</span>: <span class="pl-s">value3</span>
      <span class="pl-ent">12</span>: <span class="pl-s">value4</span></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [debug] *********************************************************************************************************************************************************************************************************************************************************
ok: [localhost] =&gt; {
    &quot;changed&quot;: false, 
    &quot;my_dict&quot;: {
        &quot;0_9_2&quot;: &quot;value&quot;
        &quot;1_1_0&quot;: &quot;value1&quot;
        &quot;0000001&quot;: &quot;value2&quot;
        &quot;1_&quot;: &quot;value3&quot;
        &quot;12&quot;: &quot;value4&quot;
    }
}"><pre class="notranslate"><code class="notranslate">TASK [debug] *********************************************************************************************************************************************************************************************************************************************************
ok: [localhost] =&gt; {
    "changed": false, 
    "my_dict": {
        "0_9_2": "value"
        "1_1_0": "value1"
        "0000001": "value2"
        "1_": "value3"
        "12": "value4"
    }
}
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>

<p dir="auto">keys casted to integers when it contains '1'?</p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [debug] TASK [debug] *********************************************************************************************************************************************************************************************************************************************************
ok: [localhost] =&gt; {
    &quot;changed&quot;: false, 
    &quot;my_dict&quot;: {
        &quot;1&quot;: &quot;value3&quot;, 
        &quot;12&quot;: &quot;value4&quot;, 
        &quot;110&quot;: &quot;value1&quot;, 
        &quot;0_9_2&quot;: &quot;value&quot;
    }
}

"><pre class="notranslate"><code class="notranslate">TASK [debug] TASK [debug] *********************************************************************************************************************************************************************************************************************************************************
ok: [localhost] =&gt; {
    "changed": false, 
    "my_dict": {
        "1": "value3", 
        "12": "value4", 
        "110": "value1", 
        "0_9_2": "value"
    }
}


</code></pre></div>