Skip to content

Commit

Permalink
Revert "t":
Browse files Browse the repository at this point in the history
This reverts commit 5c5c0dd.
  • Loading branch information
Roman Muntean committed Jun 13, 2024
1 parent 5c5c0dd commit d40b3e4
Show file tree
Hide file tree
Showing 57 changed files with 1,708 additions and 1 deletion.
15 changes: 15 additions & 0 deletions molecule/__ihs-v85/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

vars:
ihs_version: 8.5.5.20
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}

roles:
- iim
- ihs
15 changes: 15 additions & 0 deletions molecule/__ihs-v85/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Verify
hosts: all
pre_tasks:
- name: Check packages
iim_info:
iim_path: /opt/IBM/InstallationManager
register: iim_info

tasks:
- name: Check that the correct packages are installed
assert:
that:
- "iim_info.packages | \
select('match', 'com.ibm.websphere.IHS.v85.*') | list | length > 0"
15 changes: 15 additions & 0 deletions molecule/__ihs-v90/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

vars:
ihs_version: 9.0.5.19
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}

roles:
- iim
- ihs
14 changes: 14 additions & 0 deletions molecule/__ihs-v90/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: Verify
hosts: all
pre_tasks:
- name: Check packages
iim_info:
iim_path: /opt/IBM/InstallationManager
register: iim_info

tasks:
- name: Check that the correct packages are installed
assert:
that:
- "iim_info.packages | select('match', 'com.ibm.websphere.IHS.v90.*') | list | length > 0"
15 changes: 15 additions & 0 deletions molecule/__liberty/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

vars:
liberty_version: "24.0.0.3"
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}

roles:
- iim
- liberty
31 changes: 31 additions & 0 deletions molecule/__liberty/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
# The pre_tasks section is used to perform some tasks before the main tasks run.
# It's a good place for setup tasks or data collection.
pre_tasks:
- name: Check packages
# Assuming 'iim_info' module is part of the 'iim' role or a custom module.
# If it's a custom module, ensure that it's properly located in the 'library' directory inside the role.
iim_info:
iim_path: /opt/IBM/InstallationManager
register: iim_info
- name: Get jvm.options
slurp:
src: /opt/IBM/WebSphere/Liberty/usr/shared/jvm.options
register: jvm_options

tasks:
- name: Check that the correct packages are installed
# Using 'assert' module to validate conditions.
assert:
that:
- "iim_info.packages | select('match', 'com.ibm.websphere.liberty.ND.*') | list | length > 0"
- "iim_info.packages | select('match', 'com.ibm.java.jdk.v8.*') | list | length > 0"
- name: Check that jvm.options contains the expected content
# Using 'assert' module to check if '-Xmx1024m' is present in 'jvm.options' file.
assert:
that:
- "'-Xmx1024m' in (jvm_options['content'] | b64decode)"
15 changes: 15 additions & 0 deletions molecule/__liberty17/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

vars:
liberty_version: "24.0.0.3-JDK17"
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}

roles:
- iim
- liberty
31 changes: 31 additions & 0 deletions molecule/__liberty17/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
# The pre_tasks section is used to perform some tasks before the main tasks run.
# It's a good place for setup tasks or data collection.
pre_tasks:
- name: Check packages
# Assuming 'iim_info' module is part of the 'iim' role or a custom module.
# If it's a custom module, ensure that it's properly located in the 'library' directory inside the role.
iim_info:
iim_path: /opt/IBM/InstallationManager
register: iim_info
- name: Get jvm.options
slurp:
src: /opt/IBM/WebSphere/Liberty/usr/shared/jvm.options
register: jvm_options

tasks:
- name: Check that the correct packages are installed
# Using 'assert' module to validate conditions.
assert:
that:
- "iim_info.packages | select('match', 'com.ibm.websphere.liberty.ND.*') | list | length > 0"
- "iim_info.packages | select('match', 'com.ibm.java.jdk.v17.*') | list | length > 0"
- name: Check that jvm.options contains the expected content
# Using 'assert' module to check if '-Xmx1024m' is present in 'jvm.options' file.
assert:
that:
- "'-Xmx1024m' in (jvm_options['content'] | b64decode)"
2 changes: 1 addition & 1 deletion molecule/__liberty21/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- name: Check packages
# Assuming 'iim_info' module is part of the 'iim' role or a custom module.
# If it's a custom module, ensure that it's properly located in the 'library' directory inside the role.
spm-middleware.iim_info:
iim_info:
iim_path: /opt/IBM/InstallationManager
register: iim_info
- name: Get jvm.options
Expand Down
45 changes: 45 additions & 0 deletions molecule/__ohs-v12.1.3/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

tasks:
- name: Install python3
package:
name: python3
state: present

- name: Create symlink for python3
file:
src: /usr/bin/python3
dest: /usr/local/bin/python
owner: root
group: root
state: link

- name: pip self-update
pip:
name: pip
executable: pip3
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3

- name: include weblogic
include_role:
name: weblogic
vars:
ansible_python_interpreter: /usr/bin/python3
weblogic_version: "12.1.3.0.210720"

- name: include ohs
include_role:
name: ohs
vars:
ansible_python_interpreter: /usr/bin/python3
ohs_version: 12.1.3.0.200412
vars:
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}
51 changes: 51 additions & 0 deletions molecule/__ohs-v12.1.3/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
- name: Verify
hosts: all

pre_tasks:
- name: include vars
include_vars: "../../roles/ohs/vars/v12.1.3.0.200412.yml"

- name: include default
include_vars: "../../roles/ohs/defaults/main.yml"

- name: Check opatch version
shell: "grep {{ opatch_version }} {{ ohs_home }}/OPatch/version.txt"
ignore_errors: True
register: opatch_version_flag
when: opatch_version is defined

- name: Check Shell File Exists
stat:
path: "{{ profiled_path }}/ohs.sh"
register: shell

- name: Check Profile File Exists
stat:
path: /opt/.profile
register: profile

- name: Check Domain Created
shell: "grep ohs_{{ ansible_hostname }} {{ ohs_home }}/domain-registry.xml"
ignore_errors: True
register: domain_created
when: opatch_version is defined

tasks:
- name: Check Patch Number Matched
assert:
that: opatch_version_flag.rc == 0
when: opatch_version is defined

- name: Check that shell exists
assert:
that: shell.stat.exists

- name: Check that profile exists
assert:
that: profile.stat.exists

- name: Check Domain Created
assert:
that: domain_created.rc == 0
when: opatch_version is defined
44 changes: 44 additions & 0 deletions molecule/__ohs-v12.2.1.4/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
- name: Converge
hosts: all

collections:
- merative.spm_middleware

tasks:
- name: Install python3
package:
name: python3
state: present

- name: Create symlink for python3
file:
src: /usr/bin/python3
dest: /usr/local/bin/python
owner: root
group: root
state: link

- name: pip self-update
pip:
name: pip
executable: pip3
state: latest
vars:
ansible_python_interpreter: /usr/bin/python3

- name: include weblogic
include_role:
name: weblogic
vars:
ansible_python_interpreter: /usr/bin/python3
weblogic_version: "14.1.1.0.240328"

- name: include ohs
include_role:
name: ohs
vars:
ansible_python_interpreter: /usr/bin/python3
vars:
download_url: "{{ lookup('env', 'ARTIFACTORY_URL') }}/{{ lookup('env', 'ARTIFACTORY_REPO') }}/SoftwareInstallers"
download_header: { 'X-JFrog-Art-Api': "{{ lookup('env', 'ARTIFACTORY_TOKEN') }}"}
51 changes: 51 additions & 0 deletions molecule/__ohs-v12.2.1.4/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
- name: Verify
hosts: all

pre_tasks:
- name: include vars
include_vars: "../../roles/ohs/vars/v12.2.1.4.240115.yml"

- name: include default
include_vars: "../../roles/ohs/defaults/main.yml"

- name: Check opatch version
shell: "grep {{ opatch_version }} {{ ohs_home }}/OPatch/version.txt"
ignore_errors: True
register: opatch_version_flag
when: opatch_version is defined

- name: Check Shell File Exists
stat:
path: "{{ profiled_path }}/ohs.sh"
register: shell

- name: Check Profile File Exists
stat:
path: /opt/.profile
register: profile

- name: Check Domain Created
shell: "grep ohs_{{ ansible_hostname }} {{ ohs_home }}/domain-registry.xml"
ignore_errors: True
register: domain_created
when: opatch_version is defined

tasks:
- name: Check Patch Number Matched
assert:
that: opatch_version_flag.rc == 0
when: opatch_version is defined

- name: Check that shell exists
assert:
that: shell.stat.exists

- name: Check that profile exists
assert:
that: profile.stat.exists

- name: Check Domain Created
assert:
that: domain_created.rc == 0
when: opatch_version is defined
Loading

0 comments on commit d40b3e4

Please sign in to comment.