title: Azure CLI commands in Ansible AWX
body: <p>I'm running Ansible using AWX, I have configured Azure Credentials and I'm able to use Azure Modules to create/delete Azure Resources.</p>
  
  <p>However Ansible is lacking some of the modules that I need, therefore I wanted to run direct commands using Azure CLI however every time I receive a result that there is no such command.</p>
  
  <p>How Ansible/AWX/Tower is executing commands from Azure Modules?</p>
  
  <p>Running code below against localhost:</p>
  
  <pre><code>hosts: localhost
  </code></pre>
  
  <p>#</p>
  
  <pre><code>#This part is working    
  - name: Create a network interface with minimal parameters
         azure_rm_networkinterface:
          name: "{{ vm_name }}-nic"
          resource_group: "{{ internal_name }}-{{ customer_name }}"
          virtual_network: "{{ internal_name }}-vnet"
          subnet_name: "{{ internal_name }}-subnet01"
          security_group: "{{ internal_name }}-subnet01-nsg" 
  #This Part is not working     
      - name: Check Azure Version
        shell: az --version
  #The same playbook
  </code></pre>
  
  <p>Output from the job is that 1st part did some changes and 2nd one give an error:</p>
  
  <pre><code>"stderr": "/bin/sh: az: command not found",
  </code></pre>
  
  <p>Any idea how to works with Azure CLI in Ansible AWX/Tower</p>