-
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.
Add OHS role with remote download (#29)
* Initial first pass cleaning and upload. * Add OHS travis tests. * Comment out weblogic dependancy to see how far the test gets * Change order of tasks to make the check * Add download vars * Linter complaining about spaces * Doh missed a bit in the path * Need to add "OHS" to the path to the base installer also * Doh add path element to the right place * Remove unused var * Opatch path incorrrect * Increase swap size for OHS install to pass. * linter * Remove the following comment: # This is an example playbook to execute Ansible tests. * Add Python imports to placate the python linter. * Fox to readme. * Python syntax error * Remove unnecessary lint errors and update galaxy yml version * Reintroduce Weblogic role into OHS. * update by single digit * Review comments * Use consistent dest for OHS installer stuff and Java * Update .travis.yml * Update base_install.yml * Update base_install.yml * Update base_install.yml * Revert "Update base_install.yml" This reverts commit fae7564. * Revert "Revert "Update base_install.yml"" This reverts commit e40c048. * Revert "Revert "Revert "Update base_install.yml""" This reverts commit 92d2e2b. * disable travis, fix undefined var path for base install, test * remove check and unused var * Update base_install.yml * fix patches filepaths * Update base_install.yml * fix patch paths * Update patch.yml * remove pointless verify * tweak readme and clean comment * uncomment travis file * forgot to remove installer from the 12.1.3 verify as well * fix copy tasks * change repo.zip name to baseInstaller Co-authored-by: martin-cummins <[email protected]> Co-authored-by: martinccummins <[email protected]> Co-authored-by: salob <[email protected]> Co-authored-by: Roman Muntean <[email protected]>
- Loading branch information
1 parent
a0f5b64
commit 6262b93
Showing
29 changed files
with
1,398 additions
and
9 deletions.
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
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
--- | ||
# This is an example playbook to execute Ansible tests. | ||
|
||
- name: Verify | ||
hosts: all | ||
pre_tasks: | ||
|
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: | ||
- ibm.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: | ||
- ibm.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 | ||
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.210324.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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
--- | ||
# This is an example playbook to execute Ansible tests. | ||
|
||
- name: Verify | ||
hosts: all | ||
pre_tasks: | ||
|
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
--- | ||
# This is an example playbook to execute Ansible tests. | ||
|
||
- name: Verify | ||
hosts: all | ||
pre_tasks: | ||
|
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
--- | ||
# This is an example playbook to execute Ansible tests. | ||
|
||
- name: Verify | ||
hosts: all | ||
pre_tasks: | ||
|
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,34 @@ | ||
--- | ||
driver: | ||
name: docker | ||
provider: | ||
name: docker | ||
|
||
lint: | | ||
set -e | ||
yamllint . | ||
platforms: | ||
- name: centos-7 | ||
image: centos:7 | ||
dockerfile: ../_resources/Dockerfile.j2 | ||
pre_build_image: False | ||
privileged: True | ||
volume_mounts: | ||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw" | ||
command: "/usr/sbin/init" | ||
environment: | ||
container: docker | ||
|
||
provisioner: | ||
name: ansible | ||
log: true | ||
config_options: | ||
defaults: | ||
stderr_callback: debug | ||
stdout_callback: debug | ||
env: | ||
ANSIBLE_FORCE_COLOR: 'true' | ||
playbooks: | ||
converge: ../__ohs-v12.1.3/converge.yml | ||
verify: ../__ohs-v12.1.3/verify.yml |
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,34 @@ | ||
--- | ||
driver: | ||
name: docker | ||
provider: | ||
name: docker | ||
|
||
lint: | | ||
set -e | ||
yamllint . | ||
platforms: | ||
- name: centos-7 | ||
image: centos:7 | ||
dockerfile: ../_resources/Dockerfile.j2 | ||
pre_build_image: False | ||
privileged: True | ||
volume_mounts: | ||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw" | ||
command: "/usr/sbin/init" | ||
environment: | ||
container: docker | ||
|
||
provisioner: | ||
name: ansible | ||
log: true | ||
config_options: | ||
defaults: | ||
stderr_callback: debug | ||
stdout_callback: debug | ||
env: | ||
ANSIBLE_FORCE_COLOR: 'true' | ||
playbooks: | ||
converge: ../__ohs-v12.2.1/converge.yml | ||
verify: ../__ohs-v12.2.1/verify.yml |
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,34 @@ | ||
--- | ||
driver: | ||
name: docker | ||
provider: | ||
name: docker | ||
|
||
lint: | | ||
set -e | ||
yamllint . | ||
platforms: | ||
- name: centos-8 | ||
image: centos:8 | ||
dockerfile: ../_resources/Dockerfile.j2 | ||
pre_build_image: False | ||
privileged: True | ||
volume_mounts: | ||
- "/sys/fs/cgroup:/sys/fs/cgroup:rw" | ||
command: "/usr/sbin/init" | ||
environment: | ||
container: docker | ||
|
||
provisioner: | ||
name: ansible | ||
log: true | ||
config_options: | ||
defaults: | ||
stderr_callback: debug | ||
stdout_callback: debug | ||
env: | ||
ANSIBLE_FORCE_COLOR: 'true' | ||
playbooks: | ||
converge: ../__ohs-v12.2.1/converge.yml | ||
verify: ../__ohs-v12.2.1/verify.yml |
Oops, something went wrong.