Fix local_settings.py when app.plugin is not set

Without this patch the following error can be seen:
```
          ID: horizon_config
    Function: file.managed
        Name: /etc/openstack-dashboard/local_settings.py
      Result: False
     Comment: Unable to manage file: Jinja variable 'dict object' has no attribute 'plugin'
     Started: 20:38:48.391267
    Duration: 45.732 ms
     Changes:
```

This patch fixes it by first checking whether app.plugin is defined.

Change-Id: Id6f281f6593a0d96210ffc44b9ba7836d5dca9d2
3 files changed