From b197050ce038e010b5f5a44b8db0d5263d99b0a5 Mon Sep 17 00:00:00 2001 From: Jien Huang Date: Tue, 11 Jun 2024 11:43:24 +0100 Subject: [PATCH] fix ohs issue (#88) * fix ohs issue * test old rocky8 * don't install python 3 * test python * fix some pacakges * specify pip package version * roll back some unnecessary changes --- .devcontainer/devcontainer.json | 1 - ci-requirements.txt | 18 +++++++++--------- galaxy.yml | 2 +- molecule/_resources/Dockerfile.j2 | 2 +- roles/ohs/tasks/config.yml | 2 +- roles/ohs/templates/ohsNM.service.j2 | 6 +++--- roles/weblogic/vars/v14.1.1.0.240328.yml | 2 +- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 472ed13c..09bc4296 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,6 @@ "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers-contrib/features/curl-apt-get:1": {}, - "ghcr.io/devcontainers-contrib/features/jfrog-cli-npm:1": {}, "ghcr.io/devcontainers/features/python:1": {} }, "postCreateCommand": "mkdir -p /home/vscode/.ansible/plugins/ && cp -r plugins/* /home/vscode/.ansible/plugins/ && pip install -r requirements.txt", diff --git a/ci-requirements.txt b/ci-requirements.txt index a1ba2bc0..12523848 100644 --- a/ci-requirements.txt +++ b/ci-requirements.txt @@ -1,10 +1,10 @@ -ansible -pywinrm -molecule -molecule-docker -docker -ansible-lint -yamllint -passlib -jmespath +ansible==8.7.0 +pywinrm==0.4.3 +molecule==6.0.3 +molecule-docker==2.1.0 +docker==7.1.0 +ansible-lint==6.22.2 +yamllint==1.35.1 +passlib==1.7.4 +jmespath==1.0.1 requests==2.31.0 diff --git a/galaxy.yml b/galaxy.yml index 8e09eec0..a44adeeb 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.6.2 +version: 1.6.3 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/molecule/_resources/Dockerfile.j2 b/molecule/_resources/Dockerfile.j2 index ac01ac7c..47886241 100644 --- a/molecule/_resources/Dockerfile.j2 +++ b/molecule/_resources/Dockerfile.j2 @@ -23,4 +23,4 @@ RUN set -xe \ && useradd -m -g ${ANSIBLE_USER} ${ANSIBLE_USER} \ && usermod -aG ${SUDO_GROUP} ${ANSIBLE_USER} \ && usermod -aG ${DEPLOY_GROUP} ${ANSIBLE_USER} \ - && sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers + && sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers \ No newline at end of file diff --git a/roles/ohs/tasks/config.yml b/roles/ohs/tasks/config.yml index 5e70f64d..7f2ab04e 100644 --- a/roles/ohs/tasks/config.yml +++ b/roles/ohs/tasks/config.yml @@ -328,7 +328,7 @@ - name: Stop Component become: yes become_user: "{{ ohs_user }}" - shell: "./stopComponent.sh ohs1" + shell: "echo {{ weblogic_password }} | ./stopComponent.sh ohs1" args: chdir: "{{ ohs_home }}/user_projects/domains/ohs_{{ ansible_hostname }}/bin" environment: diff --git a/roles/ohs/templates/ohsNM.service.j2 b/roles/ohs/templates/ohsNM.service.j2 index 83610e09..75b72335 100644 --- a/roles/ohs/templates/ohsNM.service.j2 +++ b/roles/ohs/templates/ohsNM.service.j2 @@ -2,11 +2,11 @@ Description=Oracle HTTP Server service [Service] -User={{ ohs_user }} +User=root Group={{ ohs_group }} Environment="ORACLE_HOME={{ ohs_home }}" -ExecStart={{ ohs_home }}/user_projects/domains/ohs_{{ ansible_hostname }}/bin/startNodeManager.sh -ExecStop={{ ohs_home }}/user_projects/domains/ohs_{{ ansible_hostname }}/bin/stopNodeManager.sh +ExecStart=/bin/bash {{ ohs_home }}/user_projects/domains/ohs_{{ ansible_hostname }}/bin/startNodeManager.sh +ExecStop=/bin/bash {{ ohs_home }}/user_projects/domains/ohs_{{ ansible_hostname }}/bin/stopNodeManager.sh Restart=always [Install] diff --git a/roles/weblogic/vars/v14.1.1.0.240328.yml b/roles/weblogic/vars/v14.1.1.0.240328.yml index bf328fcd..69880fcf 100644 --- a/roles/weblogic/vars/v14.1.1.0.240328.yml +++ b/roles/weblogic/vars/v14.1.1.0.240328.yml @@ -5,7 +5,7 @@ opatch: 'p28186730_1394215_Generic.zip' opatch_version: 13.9.4.2.15 patch: 'p36454290_141100_Generic.zip' patch_number: 36454290 -napply: false +napply: False patch_folder: '36454290' java_archive_file: jdk-8u411-linux-x64.tar.gz java_version_path: 'jdk1.8.0_411'