title: Including playbook in a playbook and defining environment file
body: <p>I have an ansible playbook. When I run the playbook I specify which environment file to use.</p>
  
  <pre><code>ansible-playbook playbooks/release-deploy.yaml -i env/LAB3
  </code></pre>
  
  <p>Within the ansible-playbook I am calling another playbook and I want the same environment file to be used.</p>
  
  <p>My current config is:</p>
  
  <pre><code> - include: tasks/replace_configs.yaml
  </code></pre>
  
  <p>So when I run the playbook, I get the error:</p>
  
  <pre><code>TASK [include] *****************************************************************  
  fatal: [10.169.99.70]: FAILED! =&gt; {"failed": true, "reason": "no action detected in task. This often indicates a misspelled module name, or incorrect module path.
  
  The error appears to have been in '/home/ansible/playbooks/tasks/replace_configs.yaml': line 2, column 3, but may
  be elsewhere in the file depending on the exact syntax problem.
  
  The offending line appears to be:
  
  ---
  - hosts: cac
    ^ here
  
  
  The error appears to have been in '/home/ansible/playbooks/tasks/replace_configs.yaml': line 2, column 3, but may
  be elsewhere in the file depending on the exact syntax problem.
  
  
  The offending line appears to be:
  
  ---
  - hosts: cac
    ^ here
  "}
  </code></pre>
  
  <p><code>tasks/replace_configs.yaml</code> also needs to use <code>env/LAB3</code></p>
  
  <p>Looks like it doesn't know what <code>cac</code> is. Do I need to do another config ? </p>