Tower user remove organization (#24544)
* Remove organization field from the tower_user module re: issue #24510 * Fix trailing spaces. * Fixes for Shippable errors, pep8 * Remove a random inserted space.
This commit is contained in:
parent
40c2b8cac9
commit
e2c08edfcc
1 changed files with 2 additions and 9 deletions
|
@ -54,11 +54,6 @@ options:
|
||||||
- Password of the user.
|
- Password of the user.
|
||||||
required: False
|
required: False
|
||||||
default: null
|
default: null
|
||||||
organization:
|
|
||||||
description:
|
|
||||||
- Organization the user should be made a member of.
|
|
||||||
required: False
|
|
||||||
default: null
|
|
||||||
superuser:
|
superuser:
|
||||||
description:
|
description:
|
||||||
- User is a system wide administator.
|
- User is a system wide administator.
|
||||||
|
@ -149,7 +144,6 @@ def main():
|
||||||
last_name=dict(),
|
last_name=dict(),
|
||||||
password=dict(no_log=True),
|
password=dict(no_log=True),
|
||||||
email=dict(required=True),
|
email=dict(required=True),
|
||||||
organization=dict(),
|
|
||||||
superuser=dict(type='bool', default=False),
|
superuser=dict(type='bool', default=False),
|
||||||
auditor=dict(type='bool', default=False),
|
auditor=dict(type='bool', default=False),
|
||||||
tower_host=dict(),
|
tower_host=dict(),
|
||||||
|
@ -170,7 +164,6 @@ def main():
|
||||||
last_name = module.params.get('last_name')
|
last_name = module.params.get('last_name')
|
||||||
password = module.params.get('password')
|
password = module.params.get('password')
|
||||||
email = module.params.get('email')
|
email = module.params.get('email')
|
||||||
organization = module.params.get('organization')
|
|
||||||
superuser = module.params.get('superuser')
|
superuser = module.params.get('superuser')
|
||||||
auditor = module.params.get('auditor')
|
auditor = module.params.get('auditor')
|
||||||
state = module.params.get('state')
|
state = module.params.get('state')
|
||||||
|
@ -184,8 +177,8 @@ def main():
|
||||||
try:
|
try:
|
||||||
if state == 'present':
|
if state == 'present':
|
||||||
result = user.modify(username=username, first_name=first_name, last_name=last_name,
|
result = user.modify(username=username, first_name=first_name, last_name=last_name,
|
||||||
email=email, password=password, organization=organization,
|
email=email, password=password, is_superuser=superuser,
|
||||||
is_superuser=superuser, is_auditor=auditor, create_on_missing=True)
|
is_auditor=auditor, create_on_missing=True)
|
||||||
json_output['id'] = result['id']
|
json_output['id'] = result['id']
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
result = user.delete(username=username)
|
result = user.delete(username=username)
|
||||||
|
|
Loading…
Reference in a new issue