title: Ansible 2.5 Include Roles with Variables
body: <pre><code>ansible 2.5.5
  ...
   python version = 3.6.5 (default, Jun 17 2018, 12:26:58) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
  </code></pre>
  
  <p>I'm trying to loop over a role and apply dynamic variable. </p>
  
  <p>It seems like the variables never get applied  which means the CLI variables doesn't get overwritten like I'd hope it would ... </p>
  
  <p>could this be a variable precedence thing?</p>
  
  <p>I am declaring the variables <code>service_name</code> and <code>version</code> in the CLI as well in an attempt to deploy one service and multiple dependent services.</p>
  
  <pre><code>tasks:
      - include_role:
          name: "check_deps"
      - debug:
          msg: "{{ item }}"
        loop: "{{ deps_info_list }}"
  
      - include_role:
          name: "ecs_service"
        vars:
          service_name: "{{depsvcitem.name}}"
          version: "{{depsvcitem.version}}"
        loop: "{{deps_info_list}}"
        loop_control:
          loop_var: depsvcitem
  </code></pre>
  
  <p>When I call it with ...</p>
  
  <pre><code># args.yml
  cluster: "devops-poc"
  service_name: "bss-com-api-feed-validation"
  version: "1.0.0.8"
  </code></pre>
  
  <p>and ...</p>
  
  <pre><code>ansible-playbook playbooks/myplaybook.yml -e @args.yml 
  </code></pre>
  
  <p>The variables to the called roles in the above loop gets 
   overwritten  with the values from <code>args.yml</code> instead of the dynamic variables in the loop overriding the values of <code>args.yml</code></p>