From 930f47ecdd3664c42ac55cbade89dad422e8ab72 Mon Sep 17 00:00:00 2001 From: salob Date: Mon, 25 Sep 2023 16:59:44 +0100 Subject: [PATCH 1/4] use var for security password --- molecule/__websphere-v90/converge.yml | 2 +- roles/websphere/defaults/main.yml | 3 +++ roles/websphere/templates/AppServer.properties.j2 | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/molecule/__websphere-v90/converge.yml b/molecule/__websphere-v90/converge.yml index 7963c66..5986ae7 100644 --- a/molecule/__websphere-v90/converge.yml +++ b/molecule/__websphere-v90/converge.yml @@ -9,7 +9,7 @@ iim_agent_version: 1.9.1001.20191112_1525 iim_install_path: /opt/IBM/InstallationManager websphere_version: 9.0.5.10 - download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers" + download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}" download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"} roles: diff --git a/roles/websphere/defaults/main.yml b/roles/websphere/defaults/main.yml index 516c956..bd88e3b 100644 --- a/roles/websphere/defaults/main.yml +++ b/roles/websphere/defaults/main.yml @@ -4,6 +4,9 @@ iim_install_path: /opt/IBM/InstallationManager # websphere websphere_install_path: /opt/IBM/WebSphere/AppServer websphere_version: 9.0.5.10 +security_username: websphere +# use encrypted password +security_password: websphere # Common profiled_path: /opt/profile.d # Server info for downloading installers / repos directly, leave blank to copy diff --git a/roles/websphere/templates/AppServer.properties.j2 b/roles/websphere/templates/AppServer.properties.j2 index c98a660..109f1e4 100644 --- a/roles/websphere/templates/AppServer.properties.j2 +++ b/roles/websphere/templates/AppServer.properties.j2 @@ -6,10 +6,10 @@ as.vendor=IBM # The username and password for admin server. -security.username=websphere +security.username={{ security_username }} # Encrypt the plain-text password using 'build encrypt -Dpassword=' # NOTE: This must be updated after your first login! -security.password=websphere +security.password={{ security_password }} # The name of the WebSphere Node or WebLogic Domain Name. node.name={{ansible_hostname}} From 1608ada8d7daec4043bfd7834f8eb98d4cbeddd5 Mon Sep 17 00:00:00 2001 From: salob Date: Mon, 25 Sep 2023 17:26:08 +0100 Subject: [PATCH 2/4] makd appserver props more consistent --- roles/liberty/defaults/main.yml | 3 +++ roles/liberty/tasks/main.yml | 5 +++-- .../AppServer.properties.j2} | 6 +++--- roles/weblogic/defaults/main.yml | 4 ++-- roles/websphere/defaults/main.yml | 2 +- roles/websphere/tasks/main.yml | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) rename roles/liberty/{files/AppServer.properties => templates/AppServer.properties.j2} (88%) diff --git a/roles/liberty/defaults/main.yml b/roles/liberty/defaults/main.yml index 14ea9d7..3575db2 100644 --- a/roles/liberty/defaults/main.yml +++ b/roles/liberty/defaults/main.yml @@ -9,6 +9,9 @@ liberty_version: 23.0.0.6 liberty_default_heapsize: 1024m liberty_enable_verbose_gc: false liberty_extra_jvm_options: [] +security_username: websphere +# use encrypted password +security_password: dummypassword # Common profiled_path: /opt/profile.d diff --git a/roles/liberty/tasks/main.yml b/roles/liberty/tasks/main.yml index 5f489dd..e55a55f 100644 --- a/roles/liberty/tasks/main.yml +++ b/roles/liberty/tasks/main.yml @@ -33,10 +33,11 @@ when: ansible_os_family != "Windows" - name: Copy AppServer.properties - copy: - src: AppServer.properties + template: dest: /opt/Props/AppServer.properties + src: AppServer.properties.j2 mode: 0644 + force: no - name: Create environment files include_tasks: env.yml diff --git a/roles/liberty/files/AppServer.properties b/roles/liberty/templates/AppServer.properties.j2 similarity index 88% rename from roles/liberty/files/AppServer.properties rename to roles/liberty/templates/AppServer.properties.j2 index f250477..34a1153 100644 --- a/roles/liberty/files/AppServer.properties +++ b/roles/liberty/templates/AppServer.properties.j2 @@ -6,9 +6,9 @@ as.vendor=WLP # The username and password for admin server. -security.username=websphere +security.username={{ security_username }} # Encrypt the plain-text password using 'build encrypt -Dpassword=' -security.password=websphere +security.password={{ security_password }} # The name of the WebSphere Node or WebLogic Domain Name. node.name=liberty @@ -29,4 +29,4 @@ curam.client.httpport=10101 # HTTP Port for the server on which the Web services # will be accessed -curam.webservices.httpport=10102 +curam.webservices.httpport=10102 \ No newline at end of file diff --git a/roles/weblogic/defaults/main.yml b/roles/weblogic/defaults/main.yml index dad5b4a..a012391 100644 --- a/roles/weblogic/defaults/main.yml +++ b/roles/weblogic/defaults/main.yml @@ -13,8 +13,8 @@ domains_home: '{{ weblogic_base }}/config/Domains' applications_home: '{{ weblogic_base }}/config/applications' mw_installer_folder: '{{ weblogic_base }}/installer' domain_username: 'weblogic' -domain_password: 'weblogic' -encrypted_password: 'weblogic1' +domain_password: 'dummypassword' +encrypted_password: 'dummypassword' server_name: 'CuramServer' server_port: 7001 diff --git a/roles/websphere/defaults/main.yml b/roles/websphere/defaults/main.yml index bd88e3b..5d9e629 100644 --- a/roles/websphere/defaults/main.yml +++ b/roles/websphere/defaults/main.yml @@ -6,7 +6,7 @@ websphere_install_path: /opt/IBM/WebSphere/AppServer websphere_version: 9.0.5.10 security_username: websphere # use encrypted password -security_password: websphere +security_password: dummypassword # Common profiled_path: /opt/profile.d # Server info for downloading installers / repos directly, leave blank to copy diff --git a/roles/websphere/tasks/main.yml b/roles/websphere/tasks/main.yml index 7919124..889554c 100644 --- a/roles/websphere/tasks/main.yml +++ b/roles/websphere/tasks/main.yml @@ -31,7 +31,7 @@ template: dest: /opt/Props/AppServer.properties src: AppServer.properties.j2 - mode: 0755 + mode: 0644 force: no - name: Cleanup From babccfb5f2dd53a44f5a1dc57069d4507bf1cf8d Mon Sep 17 00:00:00 2001 From: salob Date: Mon, 25 Sep 2023 18:54:53 +0100 Subject: [PATCH 3/4] update galaxy version --- galaxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galaxy.yml b/galaxy.yml index 627bf04..7ad132e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -11,7 +11,7 @@ name: spm_middleware # The version of the collection. Must be compatible with semantic versioning # Please note. version also exists in /github/workflows/release.yml and will need to be update also -version: 1.2.8 +version: 1.2.9 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md From 6c3b5dd0f696b1677fc709a3eae9d1c1e155b3ee Mon Sep 17 00:00:00 2001 From: salob Date: Mon, 25 Sep 2023 20:39:53 +0100 Subject: [PATCH 4/4] fix path for iim --- molecule/__websphere-v90/converge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/__websphere-v90/converge.yml b/molecule/__websphere-v90/converge.yml index 5986ae7..7963c66 100644 --- a/molecule/__websphere-v90/converge.yml +++ b/molecule/__websphere-v90/converge.yml @@ -9,7 +9,7 @@ iim_agent_version: 1.9.1001.20191112_1525 iim_install_path: /opt/IBM/InstallationManager websphere_version: 9.0.5.10 - download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}" + download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers" download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"} roles: