title: Ansible: Appending to list with variable files
body: <p>Is there a way to have multiple variable files append to an array?</p>
  
  <p>The end goal is to have each file append an AWS security group for the launch configuration without the need to copy those groups into each file</p>
  
  <p>ex:</p>
  
  <pre><code>group_vars/all.yml
  group_vars/php.yml
  group_vars/web.yml
  </code></pre>
  
  <p>all.yml:</p>
  
  <pre><code>aws_security_groups:
    - sg-ssh
  </code></pre>
  
  <p>php.yml</p>
  
  <pre><code>aws_security_groups:
    - sg-mysql
  </code></pre>
  
  <p>web.yml</p>
  
  <pre><code>aws_security_groups:
    - sg-http
  </code></pre>
  
  <p>Debugging aws_security_groups produces:</p>
  
  <pre><code>TASK [Debugging] ***************************************************************
  ok: [XXX.XXX.XXX.XXX] =&gt; {
      "aws_security_groups": [
          "sg-mysql"
      ]
  }
  </code></pre>
  
  <p>We have API servers and front-end servers which have different scaling polices.  I would like the web servers to have the groups: sg-web and sg-ssh with the api servers to have: sg-web, sg-ssh and sg-mysql</p>