Merge branch 'devel' of https://github.com/ansible/ansible-modules-core into devel
This commit is contained in:
commit
05904a7e17
3 changed files with 15 additions and 3 deletions
|
@ -591,7 +591,9 @@ def get_instance_info(inst):
|
||||||
'root_device_type': inst.root_device_type,
|
'root_device_type': inst.root_device_type,
|
||||||
'root_device_name': inst.root_device_name,
|
'root_device_name': inst.root_device_name,
|
||||||
'state': inst.state,
|
'state': inst.state,
|
||||||
'hypervisor': inst.hypervisor}
|
'hypervisor': inst.hypervisor,
|
||||||
|
'tags': inst.tags,
|
||||||
|
'groups': {group.id: group.name for group in inst.groups}}
|
||||||
try:
|
try:
|
||||||
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
|
@ -30,6 +30,7 @@ DOCUMENTATION = '''
|
||||||
module: quantum_router
|
module: quantum_router
|
||||||
version_added: "1.2"
|
version_added: "1.2"
|
||||||
short_description: Create or Remove router from openstack
|
short_description: Create or Remove router from openstack
|
||||||
|
deprecated: Deprecated in 1.9. Use os_router instead
|
||||||
description:
|
description:
|
||||||
- Create or Delete routers from OpenStack
|
- Create or Delete routers from OpenStack
|
||||||
options:
|
options:
|
||||||
|
|
|
@ -797,8 +797,17 @@ class FreeBsdUser(User):
|
||||||
cmd.append(self.shell)
|
cmd.append(self.shell)
|
||||||
|
|
||||||
if self.login_class is not None:
|
if self.login_class is not None:
|
||||||
cmd.append('-L')
|
# find current login class
|
||||||
cmd.append(self.login_class)
|
user_login_class = None
|
||||||
|
if os.path.exists(self.SHADOWFILE) and os.access(self.SHADOWFILE, os.R_OK):
|
||||||
|
for line in open(self.SHADOWFILE).readlines():
|
||||||
|
if line.startswith('%s:' % self.name):
|
||||||
|
user_login_class = line.split(':')[4]
|
||||||
|
|
||||||
|
# act only if login_class change
|
||||||
|
if self.login_class != user_login_class:
|
||||||
|
cmd.append('-L')
|
||||||
|
cmd.append(self.login_class)
|
||||||
|
|
||||||
if self.groups is not None:
|
if self.groups is not None:
|
||||||
current_groups = self.user_group_membership()
|
current_groups = self.user_group_membership()
|
||||||
|
|
Loading…
Reference in a new issue