##### SUMMARY
When using azure_rm inventory plug-in, given Azure subscription, the dynamic inventory results in an incomplete list of VMs, compared to the one that can be obtained in portal.azure.com or via Azure CLI. 

The issue is mainly due to a parsing error that occurs in azure_rm.py. The code expects the 'primary' field to exist in the __nic_model['ipConfigurations'][X]['properties']__ dict. In our existing fleet of Azure VMs, some VMs do not have a primary ipConfiguration set. More precisely, that field is set to 'null', not 'True' or 'False'.

Example:
1. Using Azure cli, dump the ipConfiguration of VM vm01 that has the 'primary' field set to 'true':
```bash
az network nic ip-config list --subscription MySubscription -g MyRG --nic-name vm01nic
[
  {
    "applicationGatewayBackendAddressPools": null,
    "applicationSecurityGroups": null,
    "etag": "W/\"***\"",
    "id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/networkInterfaces/vm01nic/ipConfigurations/ipconfig1",
    "loadBalancerBackendAddressPools": null,
    "loadBalancerInboundNatRules": null,
    "name": "ipconfig1",
    "primary": true,
    "privateIpAddress": "***",
    "privateIpAddressVersion": "IPv4",
    "privateIpAllocationMethod": "Static",
    "provisioningState": "Succeeded",
    "publicIpAddress": null,
    "resourceGroup": "***",
    "subnet": {
      "addressPrefix": null,
      "etag": null,
      "id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/virtualNetworks/***/subnets/***",
      "ipConfigurations": null,
      "name": null,
      "networkSecurityGroup": null,
      "provisioningState": null,
      "resourceGroup": "***",
      "resourceNavigationLinks": null,
      "routeTable": null,
      "serviceEndpoints": null
    },
    "type": "Microsoft.Network/networkInterfaces/ipConfigurations"
  }
]
```
2. Using Azure cli, dump the ipConfiguration of VM vm02 that does not have a boolean value for the 'primary' field:
```bash
az network nic ip-config list --subscription MySubscription -g MyRG --nic-name vm02nic
[
  {
    "applicationGatewayBackendAddressPools": null,
    "applicationSecurityGroups": null,
    "etag": "W/\"***\"",
    "id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/networkInterfaces/vm02nic/ipConfigurations/ipconfig1",
    "loadBalancerBackendAddressPools": null,
    "loadBalancerInboundNatRules": null,
    "name": "ipconfig1",
    "primary": null,
    "privateIpAddress": "***",
    "privateIpAddressVersion": "IPv4",
    "privateIpAllocationMethod": "Static",
    "provisioningState": "Succeeded",
    "publicIpAddress": null,
    "resourceGroup": "***",
    "subnet": {
      "addressPrefix": null,
      "etag": null,
      "id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Network/virtualNetworks/***/subnets/***",
      "ipConfigurations": null,
      "name": null,
      "networkSecurityGroup": null,
      "provisioningState": null,
      "resourceGroup": "***",
      "resourceNavigationLinks": null,
      "routeTable": null,
      "serviceEndpoints": null
    },
    "type": "Microsoft.Network/networkInterfaces/ipConfigurations"
  }
]
```

In the second example, because of the 'null' value, that field is later removed from the __nic_model__ dict., causing a python error while fetching the inventory.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/plugins/inventory/azure_rm.py

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.8.5
  config file = /home/***/ansible/ansible_dev.cfg
  configured module search path = [u'/home/***/ansible/library']
  ansible python module location = /home/***/ansible/.venv/lib/python2.7/site-packages/ansible
  executable location = /home/***/ansible/.venv/bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
DEFAULT_BECOME_METHOD(/home/***/ansible/ansible_dev.cfg) = sudo
DEFAULT_BECOME_USER(/home/***/ansible/ansible_dev.cfg) = root
DEFAULT_GATHER_TIMEOUT(/home/***/ansible/ansible_dev.cfg) = 30
DEFAULT_HOST_LIST(/home/***/ansible/ansible_dev.cfg) = [u'/home/***/ansible/inventory/azure-dev']
DEFAULT_LOG_PATH(/home/***/ansible/ansible_dev.cfg) = /home/***/ansible.log
DEFAULT_MODULE_PATH(/home/***/ansible/ansible_dev.cfg) = [u'/home/***/ansible/library']
DEFAULT_ROLES_PATH(/home/***/ansible/ansible_dev.cfg) = [u'/home/***/ansible/roles']
DEFAULT_VAULT_IDENTITY_LIST(/home/***/ansible/ansible_dev.cfg) = ***
HOST_KEY_CHECKING(/home/***/ansible/ansible_dev.cfg) = False
INVENTORY_ENABLED(/home/***/ansible/ansible_dev.cfg) = [u'yaml', u'azure_rm', u'script']
RETRY_FILES_ENABLED(/home/***/ansible/ansible_dev.cfg) = False
```

##### OS / ENVIRONMENT
Ansible controller on RHEL 7.4

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
1. Use a resource group with one VM that is correctly retrieved via the azure_rm plugin.
1. In that resource group, create another VM with at least one NIC but with no primary ipConfiguration (I don't know whether it is still possible to do so but in our existing fleet of VMs, some do not have any NIC with a primary ipConfiguration)
1. Relaunch the dynamic inventory.

##### EXPECTED RESULTS
All resource group VMs are retrieved.

##### ACTUAL RESULTS
No VM shows up

choices: ['azure_rm']
        include_vm_resource_groups:
            description: A list of resource group names to search for virtual machines. '\*' will include all resource
                groups in the subscription.
            default: ['*']
        include_vmss_resource_groups:
            description: A list of resource group names to search for virtual machine scale sets (VMSSs). '\*' will
                include all resource groups in the subscription.
            default: []
        fail_on_template_errors:
            description: When false, template failures during group and filter processing are silently ignored (eg,
                if a filter or group expression refers to an undefined host variable)
            choices: [True, False]
            default: True
        keyed_groups:
            description: Creates groups based on the value of a host variable. Requires a list of dictionaries,
                defining C(key) (the source dictionary-typed variable), C(prefix) (the prefix to use for the new group
                name), and optionally C(separator) (which defaults to C(_))
        conditional_groups:
            description: A mapping of group names to Jinja2 expressions. When the mapped expression is true, the host
                is added to the named group.
        hostvar_expressions:
            description: A mapping of hostvar names to Jinja2 expressions. The value for each host is the result of the
                Jinja2 expression (which may refer to any of the host's existing variables at the time this inventory
                plugin runs).
        exclude_host_filters:
            description: Excludes hosts from the inventory with a list of Jinja2 conditional expressions. Each
                expression in the list is evaluated for each host; when the expression is true, the host is excluded
                from the inventory.
            default: []