From a7ed4070c272ccdcf23321b61202542532750316 Mon Sep 17 00:00:00 2001 From: Amir Mofasser Date: Fri, 22 Dec 2017 19:46:39 +0100 Subject: [PATCH 1/3] ibmim module fixes --- CHANGELOG.md | 3 + README.md | 30 ++- library/ibmim.py | 461 ++++++++++++++++------------------- library/ibmim_installer.py | 8 +- library/liberty_server.py | 11 +- library/profile_dmgr.py | 10 +- library/profile_liberty.py | 10 +- library/profile_nodeagent.py | 8 +- library/was_server.py | 8 +- library/wsadmin.py | 14 +- 10 files changed, 260 insertions(+), 303 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b530ff7..7f730d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.0.2 +* Added some additional options. + # 1.0.1 * Merged ibmim and ibmwas modules to one module, ibmim. This new updated module can be used to install, uninstall and update all IBM products that can be used with Installation Manager. Not just WebSphere. Installing Installation Manager itself can be done using the ibmim_installer module diff --git a/README.md b/README.md index a5a7b96..d9e5fe1 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # README -A set of Ansible modules that lets you manage IBM packages +A set of Ansible modules that lets you manage IBM packages and WebSphere resources + +## Getting started + +Copy the folder `library` in this repo to your playbook directory or to [`ANSIBLE_LIBRARY`](http://docs.ansible.com/ansible/latest/intro_configuration.html#library) +``` +$ git clone https://github.com/amimof/ansible-websphere && cp -r ansible-websphere/library +``` ## Module Summary | Module | Description | @@ -49,30 +56,31 @@ This module installs, uninstalls or updates IBM packages from local or remote re | ibmim | false | /opt/IBM/InstallationManager | N/A | Path to installation directory of Installation Manager | | dest | false | N/A | N/A | Path to destination installation directory | | im_shared | false | N/A | N/A | Path to Installation Manager shared resources folder | -| repo | false | N/A | N/A | Comma separated list of URLs or paths to installation repositories used by Installation Manager | | id | true | N/A | N/A | ID of the package which you want to install | | repositories | false | N/A | N/A | Comma separated list of repositories to use. May be a path, URL or both | | properties | false | N/A | N/A | Comma separated list of properties needed for package installation. In the format key1=value,key2=value | | install_fixes | false | none | N/A | Install fixes if available in the repositories | | connect_passport_advantage | false | N/A | N/A | Append the PassportAdvantage repository to the repository list | +| log | false | N/A | N/A | Specify a log file that records the result of Installation Manager operations. | #### Example ```yaml - name: Install WebSphere Application Server Liberty v8.5 ibmim: - id: com.ibm.websphere.liberty.BASE.v85 - repositories: /var/data/was + name: com.ibm.websphere.liberty.v85 + repositories: + - http://was-repos/ - name: Uninstall WebSphere Application Server Liberty v8.5 - ibmim: - id: com.ibm.websphere.liberty.BASE.v85 - state: absent + ibmim: + name: com.ibm.websphere.liberty.v85 + state: absent - name: Update all packages - ibmim: - id: null - state: update - repositories: /var/data/was + ibmim: + state: latest + repositories: + - http://was-repos/ ``` ### profile_dmgr.py diff --git a/library/ibmim.py b/library/ibmim.py index 526d168..dc64c21 100755 --- a/library/ibmim.py +++ b/library/ibmim.py @@ -1,31 +1,34 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# Author: Amir Mofasser -# -# This is an Ansible module. Installs/Uninstall IBM WebSphere Application Server Binaries -# -# $IM_INSTALL_DIR/eclipse/tools/imcl install com.ibm.websphere.ND.v85 -# -repositories $ND_REPO_DIR -# -installationDirectory $ND_INSTALL_DIR -# -sharedResourcesDirectory $IM_SHARED_INSTALL_DIR -# -acceptLicense -showProgress - -ANSIBLE_METADATA = {'metadata_version': '1.0', - 'status': ['preview'], - 'supported_by': 'community'} - -DOCUMENTATION = """ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +ANSIBLE_METADATA = {'status': ['preview'], + 'supported_by': 'community', + 'metadata_version': '1.1'} + +DOCUMENTATION = ''' +--- module: ibmim -version_added: "1.9.4" short_description: Manage IBM Installation Manager packages -description: Install, Update and Uninstall Installation Manager packages using remote or local repositories +description: + - This module can Install, Uninstall and Update IBM Installation Manager packages on a supported Linux distribution. + - This module relies on 'imcl', the binary command line tool which manages IM packages. You may use this module to install Installation Manager itself. +version_added: "1.9.4" +author: Amir Mofasser (@github) +requirements: + - IBM Installation Manager + - Installation files on remote server or local directory options: id: - required: true - description: Name of the package which is to be installed + required: false + description: The ID of the package which is to be installed + aliases: + - name ibmim: required: false - default: '/opt/IBM/InstallationManager' + default: /opt/IBM/InstallationManager description: Path to installation directory of Installation Manager dest: required: false @@ -35,47 +38,63 @@ description: Path to Installation Manager shared resources folder repositories: required: false - description: Comma separated list of repositories to use. May be a path, URL or both. + description: A list of repositories to use. May be a path, URL or both. + type: list + aliases: + - repos + preferences: + required: false + type: list + description: Specify a preference value or a comma-delimited list of preference values to be used properties: required: false - description: Comma separated list of properties needed for package installation. In the format key1=value,key2=value + type: list + description: Specify a preference value or a comma-delimited list of properties values to be used state: required: false - choices: [ present, absent, update ] + choices: + - present + - absent + - latest default: present - description: Install a package with 'present'. Uninstall a package with 'absent'. Update all packages with 'update'. + description: Install a package with 'present'. Uninstall a package with 'absent'. Update all packages with 'latest'. install_fixes: required: false - choices: [ none, recommended, all ] + choices: + - none + - recommended + - all default: none description: Install fixes if available in the repositories. - connect_passport_advantage + connect_passport_advantage: required: false default: false + type: bool description: Append the PassportAdvantage repository to the repository list -requirements: - - IBM Installation Manager - - Installation files on remote server or local directory -author: "Amir Mofasser (@amofasser)" -""" + log: + required: false + description: Specify a log file that records the result of Installation Manager operations. +''' -EXAMPLES = """ +EXAMPLES = ''' +--- - name: Install WebSphere Application Server Liberty v8.5 ibmim: - id: com.ibm.websphere.liberty.BASE.v85 - repositories: /var/data/was + name: com.ibm.websphere.liberty.v85 + repositories: + - http://was-repos/ - name: Uninstall WebSphere Application Server Liberty v8.5 ibmim: - id: com.ibm.websphere.liberty.BASE.v85 + name: com.ibm.websphere.liberty.v85 state: absent - name: Update all packages ibmim: - id: null - state: update - repositories: /var/data/was -""" + state: latest + repositories: + - http://was-repos/ +''' import os import subprocess @@ -84,6 +103,8 @@ import shutil import re +from ansible.module_utils.basic import AnsibleModule + class InstallationManager(): module = None @@ -93,8 +114,8 @@ class InstallationManager(): id = None, path = None, name = None, - check_stdout = None, - check_stderr = None + stdout = None, + stderr = None ) def __init__(self): @@ -103,13 +124,13 @@ def __init__(self): argument_spec = dict( # install/uninstall/updateAll - state = dict(default='present', choices=['present', 'absent', 'update']), + state = dict(default='present', choices=['present', 'absent', 'latest']), # /opt/IBM/InstallationManager ibmim = dict(default='/opt/IBM/InstallationManager'), # Package ID - id = dict(required=True), + id = dict(required=False, aliases=['name']), # -installationDirectory dest = dict(required=False), @@ -118,16 +139,22 @@ def __init__(self): im_shared = dict(required=False), # -repositories - repositories = dict(required=False), + repositories = dict(required=False, type='list', aliases=['repos']), + + # -properties + preferences = dict(required=False, type='list'), # -properties - properties = dict(required=False), + properties = dict(required=False, type='list'), # -connectPassportAdvantage connect_passport_advantage = dict(default=False, type='bool'), # -installFixes - install_fixes = dict(default='none', choices=['none', 'recommended', 'all']) + install_fixes = dict(default='none', choices=['none', 'recommended', 'all']), + + # -log + log = dict(required=False) ), supports_check_mode = True @@ -140,7 +167,7 @@ def getItem(self, key): return self.module_facts[key] - def isProvisioned(self, dest, pacakgeId): + def isProvisioned(self, dest, packageId): """ Checks if package is already installed at dest :param dest: Destination installation directory of the product @@ -150,10 +177,10 @@ def isProvisioned(self, dest, pacakgeId): if dest: if not os.path.exists(dest): return False - return self.getVersion(pacakgeId)["installed"] + return self.getVersion(packageId)["installed"] - def getVersion(self, pacakgeId): + def getVersion(self, packageId): child = subprocess.Popen( ["{0}/eclipse/tools/imcl " @@ -167,19 +194,17 @@ def getVersion(self, pacakgeId): stdout_value, stderr_value = child.communicate() # Store stdout and stderr - self.module_facts["check_stdout"] = stdout_value - self.module_facts["check_stderr"] = stderr_value + self.module_facts["stdout"] = stdout_value + self.module_facts["stderr"] = stderr_value if child.returncode != 0: self.module.fail_json( - msg="Error getting installed version of package '{0}'".format(pacakgeId), - stdout=stdout_value, - stderr=stderr_value, - + msg="Error getting installed version of package '{0}'".format(packageId), + stdout=stdout_value ) for line in stdout_value.split(os.linesep): - if pacakgeId in line: + if packageId in line: linesplit = line.split(" : ") self.module_facts["installed"] = True self.module_facts["path"] = linesplit[0] @@ -190,205 +215,151 @@ def getVersion(self, pacakgeId): return self.module_facts + def install(self, module_params): + + # Check mode on + if self.module.check_mode: + self.module.exit_json(msg="Package '{0}' is to be installed".format(module_params['id'])) + + # Check wether package is already installed + if self.isProvisioned(module_params['dest'], module_params['id']): + self.module.exit_json(changed=False, msg="Package '{0}' is already installed".format(module_params['id']), ansible_facts=self.module_facts) + + # Check if one of repositories and connectPassportAdvantage is provided + if not module_params['repositories'] and not module_params['connect_passport_advantage']: + self.module.fail_json(msg="One or more repositories are required when installing packages") + + cmd = ("{0}/eclipse/tools/imcl install {1} " + "-repositories {2} " + "-acceptLicense " + "-stopBlockingProcesses ").format(module_params['ibmim'], module_params['id'], ",".join(module_params['repositories'])) + + if module_params['dest']: + cmd = "{0} -installationDirectory {1} ".format(cmd, module_params['dest']) + if module_params['im_shared']: + cmd = "{0} -sharedResourcesDirectory {1} ".format(cmd, module_params['im_shared']) + if module_params['properties']: + cmd = "{0} -properties {1} ".format(cmd, ",".join(module_params['properties'])) + if module_params['preferences']: + cmd = "{0} -preferences {1} ".format(cmd, ",".join(module_params['preferences'])) + if module_params['install_fixes']: + cmd = "{0} -installFixes {1} ".format(cmd, module_params['install_fixes']) + if module_params['connect_passport_advantage']: + cmd = "{0} -connectPassportAdvantage ".format(cmd) + if module_params['log']: + cmd = "{0} -log {1} ".format(cmd, module_params['log']) - def main(self): + child = subprocess.Popen( + [cmd], + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE + ) + + stdout_value, stderr_value = child.communicate() + if child.returncode != 0: + self.module.fail_json( + msg="Failed installing package '{0}'".format(module_params['id']), + stdout=stdout_value, + stderr=stderr_value + ) + + # After install, get versionInfo so that we can show it to the user + self.getVersion(module_params['id']) + self.module.exit_json(changed=True, msg="Package '{0}' installed".format(module_params['id']), ansible_facts=self.module_facts) + + def uninstall(self, module_params): - state = self.module.params['state'] - ibmim = self.module.params['ibmim'] - dest = self.module.params['dest'] - im_shared = self.module.params['im_shared'] - repositories = self.module.params['repositories'] - pacakgeId = self.module.params['id'] - properties = self.module.params['properties'] - installFixes = self.module.params['install_fixes'] - connectPassportAdvantage = self.module.params['connect_passport_advantage'] + # CHeck mode on + if self.module.check_mode: + self.module.exit_json(changed=False, msg="Package '{0}' is to be uninstalled".format(module_params['id']), ansible_facts=self.module_facts) + + # Check wether package is installed + if not self.isProvisioned(module_params['dest'], module_params['id']): + self.module.exit_json(changed=False, msg="Package '{0}' is not installed".format(module_params['id']), ansible_facts=self.module_facts) + + cmd = "{0}/eclipse/tools/imcl uninstall {1} ".format(module_params['ibmim'], module_params['id']) + + if module_params['dest']: + cmd = "{0} -installationDirectory {1} ".format(cmd, module_params['dest']) + if module_params['preferences']: + cmd = "{0} -preferences {1} ".format(cmd, ",".join(module_params['preferences'])) + if module_params['properties']: + cmd = "{0} -properties {1} ".format(cmd, ",".join(module_params['properties'])) + if module_params['log']: + cmd = "{0} -log {1} ".format(cmd, module_params['log']) + + child = subprocess.Popen( + [cmd], + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE + ) + stdout_value, stderr_value = child.communicate() + if child.returncode != 0: + self.module.fail_json(msg="Failed uninstalling package '{0}'".format(module_params['id'])) + + # Remove AppServer dir forcefully so that it doesn't prevents us from reinstalling. + shutil.rmtree(module_params['dest'], ignore_errors=False, onerror=None) + self.module.exit_json(changed=True, msg="Package '{0}' uninstalled".format(module_params['id']), ansible_facts=self.module_facts) + + def updateAll(self, module_params): + + # Check mode on + if self.module.check_mode: + self.module.exit_json(changed=False, msg="All installed packages are to be updated".format(module_params['id']), ansible_facts=self.module_facts) + + # Check if one of repositories and connectPassportAdvantage is provided + if not module_params['repositories'] and not module_params['connect_passport_advantage']: + self.module.fail_json(msg="One or more repositories are required when installing packages") + + cmd = ("{0}/eclipse/tools/imcl updateAll " + "-acceptLicense -repositories {1}").format(module_params['ibmim'], ",".join(module_params['repositories'])) + + if module_params['preferences']: + cmd = "{0} -preferences {1} ".format(cmd, ",".join(module_params['preferences'])) + if module_params['properties']: + cmd = "{0} -properties {1} ".format(cmd, ",".join(module_params['properties'])) + if module_params['connect_passport_advantage']: + cmd = "{0} -connectPassportAdvantage ".format(cmd) + if module_params['install_fixes']: + cmd = "{0} -installFixes {1} ".format(cmd, module_params['install_fixes']) + if module_params['log']: + cmd = "{0} -log {1} ".format(cmd, module_params['log']) + + child = subprocess.Popen( + [cmd], + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE + ) + stdout_value, stderr_value = child.communicate() + + if child.returncode != 0: + self.module.fail_json(msg="Failed updating packages", stdout=stdout_value, stderr=stderr_value) + + self.module.exit_json(changed=True, msg="All packages updated", ansible_facts=self.module_facts) + + def main(self): # Check if paths are valid - if not os.path.exists("{0}/eclipse".format(ibmim)): + if not os.path.exists("{0}/eclipse".format(self.module.params['ibmim'])): self.module.fail_json( - msg="{0}/eclipse not found. Make sure IBM Installation Manager is installed and that ibmim is pointing to correct directory.".format(ibmim), - module_facts=self.module_facts - ) + msg="IBM Installation Manager is not installed. Install it and try again.") # Install - if state == 'present': - - if self.module.check_mode: - self.module.exit_json( - changed=False, - msg="Package '{0}' is to be installed".format(pacakgeId), - module_facts=self.module_facts - ) - - # Check wether pacakge is already installed - if not self.isProvisioned(dest, pacakgeId): - - if not repositories: - self.module.fail_json( - changed=False, - msg="Param repositories is required when installing packages", - module_facts=self.module_facts - ) - - cmd = ("{0}/eclipse/tools/imcl install {1} " - "-repositories {2} " - "-acceptLicense " - "-stopBlockingProcesses ").format(ibmim, pacakgeId, repositories) - - if dest: - cmd = "{0} -installationDirectory {1} ".format(cmd, dest) - if im_shared: - cmd = "{0} -sharedResourcesDirectory {1} ".format(cmd, im_shared) - if properties: - cmd = "{0} -properties {1} ".format(cmd, properties) - if installFixes: - cmd = "{0} -installFixes {1} ".format(cmd, installFixes) - if connectPassportAdvantage: - cmd = "{0} -connectPassportAdvantage ".format(cmd) - - child = subprocess.Popen( - [cmd], - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ) - stdout_value, stderr_value = child.communicate() - if child.returncode != 0: - self.module.fail_json( - changed=False, - msg="Failed installing package '{0}'".format(pacakgeId), - stdout=stdout_value, - stderr=stderr_value, - module_facts=self.module_facts - ) - - # After install, get versionInfo so that we can show it to the user - self.getVersion(pacakgeId) - self.module.exit_json( - changed=True, - msg="Package '{0}' installed successfully".format(pacakgeId), - stdout=stdout_value, - stderr=stderr_value, - module_facts=self.module_facts - ) - - else: - - self.module.exit_json( - changed=False, - msg="Package '{0}' is already installed".format(pacakgeId), - stdout=self.getItem("check_stdout"), - stderr=self.getItem("check_stderr"), - module_facts=self.module_facts - ) + if self.module.params['state'] == 'present': + self.install(self.module.params) - - # Uninstall - if state == 'absent': - - if self.module.check_mode: - self.module.exit_json( - changed=False, - msg="Package '{0}' is to be uninstalled".format(pacakgeId), - module_facts=self.module_facts - ) - - # Check wether was is installed - if self.isProvisioned(dest, pacakgeId): - - cmd = "{0}/eclipse/tools/imcl uninstall {1} ".format(ibmim, pacakgeId) - - if dest: - cmd = "{0} -installationDirectory {1} ".format(cmd, dest) - if properties: - cmd = "{0} -properties {1} ".format(cmd, properties) - if preferences: - cmd = "{0} -preferences {1} ".format(cmd, preferences) - - child = subprocess.Popen( - [cmd], - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ) - stdout_value, stderr_value = child.communicate() - if child.returncode != 0: - self.module.fail_json( - msg="Failed uninstalling package '{0}'".format(pacakgeId), - stdout=stdout_value, - stderr=stderr_value, - module_facts=self.module_facts - ) - - # Remove AppServer dir forcefully so that it doesn't prevents us from reinstalling. - shutil.rmtree(dest, ignore_errors=False, onerror=None) - self.module.exit_json( - changed=True, - msg="Package '{0}' uninstalled successfully".format(pacakgeId), - stdout=stdout_value, - stderr=stderr_value, - module_facts=self.module_facts - ) - - else: - self.module.exit_json( - changed=False, - msg="Package '{0}' is not installed".format(pacakgeId), - module_facts=self.module_facts - ) - if state == 'update': - - if self.module.check_mode: - self.module.exit_json( - changed=False, - msg="All installed packages are to be updated".format(pacakgeId), - module_facts=self.module_facts - ) - - if not repositories: - self.module.fail_json( - changed=False, - msg="Param repositories is required when updating packages", - module_facts=self.module_facts - ) - - cmd = ("{0}/eclipse/tools/imcl updateAll " - "-repositories {1}").format(ibmim, repositories) - - if properties: - cmd = "{0} -properties {1} ".format(cmd, properties) - if connectPassportAdvantage: - cmd = "{0} -connectPassportAdvantage ".format(cmd) - if installFixes: - cmd = "{0} -installFixes {1} ".format(cmd, installFixes) - - - child = subprocess.Popen( - [cmd], - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ) - stdout_value, stderr_value = child.communicate() - if child.returncode != 0: - self.module.fail_json( - msg="Failed updating packages", - stdout=stdout_value, - stderr=stderr_value, - module_facts=self.module_facts - ) - - self.module.exit_json( - changed=True, - msg="All packages updated", - stdout=stdout_value, - stderr=stderr_value, - module_facts=self.module_facts - ) + if self.module.params['state'] == 'absent': + self.uninstall(self.module.params) + + # Update everything + if self.module.params['state'] == 'latest': + self.updateAll(self.module_params) # import module snippets -from ansible.module_utils.basic import * if __name__ == '__main__': im = InstallationManager() - im.main() + im.main() \ No newline at end of file diff --git a/library/ibmim_installer.py b/library/ibmim_installer.py index 2cb2ea3..691f64d 100644 --- a/library/ibmim_installer.py +++ b/library/ibmim_installer.py @@ -1,10 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# -# Author: Amir Mofasser -# -# This is an Ansible module. Installs/Uninstall IBM Installation Manager -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = """ module: ibmim_installer diff --git a/library/liberty_server.py b/library/liberty_server.py index f6135c4..f514183 100755 --- a/library/liberty_server.py +++ b/library/liberty_server.py @@ -1,13 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# -# Author: Amir Mofasser -# -# This is an Ansible module. Start/Stop a liberty server -# -# $LIBERTY_SERVER_DIR/server stop -# $LIBERTY_SERVER_DIR/server start -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import os import subprocess diff --git a/library/profile_dmgr.py b/library/profile_dmgr.py index 8b072b9..91e780a 100755 --- a/library/profile_dmgr.py +++ b/library/profile_dmgr.py @@ -1,10 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# -# Author: Amir Mofasser -# -# This is an Ansible module. -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = """ module: profile_dmgr @@ -71,7 +69,7 @@ def isProvisioned(dest, profileName): """ - Runs manageprofiles.sh -listProfiles command nd stores the output in a dict + Runs manageprofiles.sh -listProfiles command and stores the output in a dict :param dest: WAS installation dir :param profilesName: Profile Name :return: boolean diff --git a/library/profile_liberty.py b/library/profile_liberty.py index 8ed0dac..868c34f 100755 --- a/library/profile_liberty.py +++ b/library/profile_liberty.py @@ -1,12 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# -# Author: Amir Mofasser -# -# This is an Ansible module. Creates a Liberty server -# -# server create server_name -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import os import subprocess diff --git a/library/profile_nodeagent.py b/library/profile_nodeagent.py index 8574098..47cc949 100755 --- a/library/profile_nodeagent.py +++ b/library/profile_nodeagent.py @@ -1,10 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# -# Author: Amir Mofasser -# -# This is an Ansible module. Installs/Uninstall IBM Installation Manager -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = """ module: profile_dmgr diff --git a/library/was_server.py b/library/was_server.py index cba48d5..48574c5 100644 --- a/library/was_server.py +++ b/library/was_server.py @@ -1,10 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# -# Author: Amir Mofasser -# -# Stop/Start a WebSphere Application Server -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = """ module: was_server diff --git a/library/wsadmin.py b/library/wsadmin.py index ea33b10..ab09584 100755 --- a/library/wsadmin.py +++ b/library/wsadmin.py @@ -1,16 +1,8 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2015 Amir Mofasser (@amimof) -# Run a wsadmin script. -# -# DO NOT USE THIS MODULE. UNDER DEVELOPMENT -# -# wsadmin.sh -lang jython -# -conntype SOAP -# -host -# -port -# -username -# -password -# -f ... +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import os import subprocess From 7c9cf590e58d8ebb7adf417e9c6c8c46084d00fb Mon Sep 17 00:00:00 2001 From: Amir Mofasser Date: Tue, 9 Jan 2018 23:04:28 +0100 Subject: [PATCH 2/3] Updated doc --- library/ibmim.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/library/ibmim.py b/library/ibmim.py index dc64c21..226e992 100755 --- a/library/ibmim.py +++ b/library/ibmim.py @@ -14,7 +14,7 @@ short_description: Manage IBM Installation Manager packages description: - This module can Install, Uninstall and Update IBM Installation Manager packages on a supported Linux distribution. - - This module relies on 'imcl', the binary command line tool which manages IM packages. You may use this module to install Installation Manager itself. + - This module relies on 'imcl', the binary command line installed by the IM installer. You may use this module to install Installation Manager itself. version_added: "1.9.4" author: Amir Mofasser (@github) requirements: @@ -22,36 +22,28 @@ - Installation files on remote server or local directory options: id: - required: false description: The ID of the package which is to be installed aliases: - name ibmim: - required: false default: /opt/IBM/InstallationManager description: Path to installation directory of Installation Manager dest: - required: false description: Path to destination installation directory im_shared: - required: false description: Path to Installation Manager shared resources folder repositories: - required: false description: A list of repositories to use. May be a path, URL or both. type: list aliases: - repos preferences: - required: false type: list description: Specify a preference value or a comma-delimited list of preference values to be used properties: - required: false type: list description: Specify a preference value or a comma-delimited list of properties values to be used state: - required: false choices: - present - absent @@ -59,7 +51,6 @@ default: present description: Install a package with 'present'. Uninstall a package with 'absent'. Update all packages with 'latest'. install_fixes: - required: false choices: - none - recommended @@ -67,12 +58,10 @@ default: none description: Install fixes if available in the repositories. connect_passport_advantage: - required: false default: false type: bool description: Append the PassportAdvantage repository to the repository list log: - required: false description: Specify a log file that records the result of Installation Manager operations. ''' From df6eb7f3553da8b0388eac5b96954d86476a0332 Mon Sep 17 00:00:00 2001 From: Amir Mofasser Date: Tue, 9 Jan 2018 23:12:25 +0100 Subject: [PATCH 3/3] Updated README --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f730d3..a051ec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # 1.0.2 -* Added some additional options. +* Added some additional options +* `acceptLicense` is now present on the cmd when updating packages +* Improved some module outputting # 1.0.1 * Merged ibmim and ibmwas modules to one module, ibmim. This new updated module can be used to install, uninstall and update all IBM products that can be used with Installation Manager. Not just WebSphere. Installing Installation Manager itself can be done using the ibmim_installer module