Skip to content

Commit

Permalink
feat: add update docs for update_app_lists property
Browse files Browse the repository at this point in the history
  • Loading branch information
Mel3VeN authored and tbreiden committed Aug 30, 2023
1 parent 2410985 commit ffc300f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions docs/univention_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ The below requirements are needed on the host that executes this module.

## Parameters

| Parameter | Defaults | Comments |
| ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| name (string) | | The name of the App that is managed. |
| state (string) | "present" | The desired state of the App (present/absent/started/stopped). |
| version (string) | "current" | The desired version of the app (cannot be lower than currently installed) or latest (If App not installed, "current" behaves like latest). |
| auth_username (string) | | The Administrator Username on the UCS system. |
| auth_password (string) | | The Admin Password for the system. |
| config (dict) | | A dict of configuration properties for the selceted Application (case-insentitive). |
| stall (str) | | Whether App should be stalled or unstalled ("stalled", "unstalled"). |
| Parameter | Defaults | Comments |
| ----------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| name (string) | | The name of the App that is managed. |
| state (string) | "present" | The desired state of the App (present/absent/started/stopped). |
| version (string) | "current" | The desired version of the app (cannot be lower than currently installed) or latest (If App not installed, "current" behaves like latest). |
| auth_username (string) | | The Administrator Username on the UCS system. |
| auth_password (string) | | The Admin Password for the system. |
| config (dict) | | A dict of configuration properties for the selceted Application (case-insentitive). |
| stall (str) | | Whether App should be stalled or unstalled ("stalled", "unstalled"). |
| update_app_lists (bool) | True | Updates the list of apps and their versions - Only runs when app is installed or updated |

## Notes

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/univention_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,15 @@ def main():
changed=True,
msg='Non-UCS-system detected. Nothing to do here.'
)

# update app lists
def update_lists():

if module.params.get('update_app_lists'):
_update_lists = update_app_lists()
if _update_lists[0] != 0:
return module.fail_json(
msg='''
An Error occured running univention-app update.
An Error occured running univention-app update.
To disable updating app lists set "update_app_lists" to False
'''
)
Expand All @@ -439,7 +439,7 @@ def update_lists():
app_status_target = module.params.get('state') # desired state of the app
app_name = module.params.get('name') # name of the app
auth_password = module.params.get(
'auth_password') # password for domain-adimin
'auth_password') # password for domain-admin
auth_username = module.params.get(
'auth_username')
app_present = check_app_present(app_name)
Expand Down

0 comments on commit ffc300f

Please sign in to comment.