-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 5c5c0dd.
- Loading branch information
Roman Muntean
committed
Jun 13, 2024
1 parent
5c5c0dd
commit d40b3e4
Showing
57 changed files
with
1,708 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') }}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') }}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.