title: Append list variable to another list in Ansible
body: <p>is it possible to append a variable list to a static list in ansible? </p>
  
  <p>I can define the whole list as a variable:</p>
  
  <pre><code>my_list:
    - 1
    - 2
    - 3
  </code></pre>
  
  <p>and then use it in a playbook as</p>
  
  <pre><code>something: {{my_list}}
  </code></pre>
  
  <p>But I cannot seem to find how to do this (pseudo code):</p>
  
  <pre><code>list_to_append: 
    - 3
    - 4
  </code></pre>
  
  <p>and then in the playbook:</p>
  
  <pre><code>something:
    - 1
    - 2
    - {{append: list_to_append}}
  </code></pre>
  
  <p>If that is in fact impossible, what would you suggest for my use case?</p>
  
  <p>I have a list of items in a parameter, but some of them are <code>optional</code> and should be modifiable using variables.</p>
  
  <p>In other words: I have <code>default values</code> + <code>optional values</code> that could or could not be added via variables.</p>
  
  <p>The <code>optional values</code> are not known in advance, I could add 1, 2 or 100 of them, so they are not static. </p>
  
  <p>I basically have a default static list ++ a configurable variable list to append. </p>
  
  <p>edit:
  I found this but it's only for with_items and I need it in a normal parameter:</p>
  
  <pre><code>  with_flattened:
     - "{{list1}}"
     - "{{list2}}"
  </code></pre>