Merge "Fix inventory plugin on Ansible 2.11"
This commit is contained in:
commit
75b2c60960
|
@ -22,7 +22,7 @@ options:
|
||||||
plugin:
|
plugin:
|
||||||
description: token that ensures this is a source file for the 'openstack' plugin.
|
description: token that ensures this is a source file for the 'openstack' plugin.
|
||||||
required: True
|
required: True
|
||||||
choices: ['openstack']
|
choices: ['openstack', 'openstack.cloud.openstack']
|
||||||
show_all:
|
show_all:
|
||||||
description: toggles showing all vms vs only those with a working IP
|
description: toggles showing all vms vs only those with a working IP
|
||||||
type: bool
|
type: bool
|
||||||
|
@ -112,7 +112,7 @@ extends_documentation_fragment:
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# file must be named openstack.yaml or openstack.yml
|
# file must be named openstack.yaml or openstack.yml
|
||||||
# Make the plugin behave like the default behavior of the old script
|
# Make the plugin behave like the default behavior of the old script
|
||||||
plugin: openstack
|
plugin: openstack.cloud.openstack
|
||||||
expand_hostvars: yes
|
expand_hostvars: yes
|
||||||
fail_on_errors: yes
|
fail_on_errors: yes
|
||||||
all_projects: yes
|
all_projects: yes
|
||||||
|
@ -159,7 +159,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||||
msg = ''
|
msg = ''
|
||||||
if not self._config_data:
|
if not self._config_data:
|
||||||
msg = 'File empty. this is not my config file'
|
msg = 'File empty. this is not my config file'
|
||||||
elif 'plugin' in self._config_data and self._config_data['plugin'] != self.NAME:
|
elif 'plugin' in self._config_data and self._config_data['plugin'] not in (self.NAME, 'openstack'):
|
||||||
msg = 'plugin config file, but not for us: %s' % self._config_data['plugin']
|
msg = 'plugin config file, but not for us: %s' % self._config_data['plugin']
|
||||||
elif 'plugin' not in self._config_data and 'clouds' not in self._config_data:
|
elif 'plugin' not in self._config_data and 'clouds' not in self._config_data:
|
||||||
msg = "it's not a plugin configuration nor a clouds.yaml file"
|
msg = "it's not a plugin configuration nor a clouds.yaml file"
|
||||||
|
|
Loading…
Reference in New Issue