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_name': inst.root_device_name,
|
||||
'state': inst.state,
|
||||
'hypervisor': inst.hypervisor}
|
||||
'hypervisor': inst.hypervisor,
|
||||
'tags': inst.tags,
|
||||
'groups': {group.id: group.name for group in inst.groups}}
|
||||
try:
|
||||
instance_info['virtualization_type'] = getattr(inst,'virtualization_type')
|
||||
except AttributeError:
|
||||
|
|
|
@ -30,6 +30,7 @@ DOCUMENTATION = '''
|
|||
module: quantum_router
|
||||
version_added: "1.2"
|
||||
short_description: Create or Remove router from openstack
|
||||
deprecated: Deprecated in 1.9. Use os_router instead
|
||||
description:
|
||||
- Create or Delete routers from OpenStack
|
||||
options:
|
||||
|
|
|
@ -797,8 +797,17 @@ class FreeBsdUser(User):
|
|||
cmd.append(self.shell)
|
||||
|
||||
if self.login_class is not None:
|
||||
cmd.append('-L')
|
||||
cmd.append(self.login_class)
|
||||
# find current 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:
|
||||
current_groups = self.user_group_membership()
|
||||
|
|
Loading…
Reference in a new issue