title: How to use lxc_container module in Ansible?
body: <p>I am trying to run this playbook</p>
  
  <pre><code>---
  - hosts: control
    become: yes
    tasks:
      - name: Stop All Linux Containers
        lxc_container: name={{ item }} state=started
        with_items:
          - app01
          - app02
          - lb01
          - db01
  </code></pre>
  
  <p>the target host is localhost but it is failing and showing following error</p>
  
  <pre><code>failed: [127.0.0.1] =&gt; (item=app01) =&gt; {"failed": true, "item": "app01",    "parsed": false}
  BECOME-SUCCESS-rppgggxcewgndkgtnpptrgeglbfykput
  failed=True msg='The lxc module is not importable. Check the requirements.'
  The lxc module is not importable. Check the requirements
  </code></pre>
  
  <p>After this I tried </p>
  
  <pre><code>pip install lxc-python2 
  </code></pre>
  
  <p>(saw it from another stackoverflow post) But it is showing an error too</p>
  
  <pre><code>lxc.c:27:30: fatal error: lxc/lxccontainer.h: No such file or directory
  
   #include &lt;lxc/lxccontainer.h&gt;
  
                                ^
  
  compilation terminated.
  
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Cleaning up...
  Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_dhruv/lxc-python2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ZKdf9M-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_dhruv/lxc-python2
  Storing debug log for failure in /home/dhruv/.pip/pip.log
  </code></pre>