Skip to content

Commit

Permalink
nomis: TM-472: update weblogic 19c role (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
drobinson-moj authored Sep 11, 2024
1 parent e053816 commit fbf4ce4
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ansible/group_vars/server_type_nomis_web19c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ server_type_roles_list:
- ansible-script
- epel
- sshd-config
- nomis-weblogic-19c
- collectd
- amazon-cloudwatch-agent
- amazon-cloudwatch-agent-collectd
Expand All @@ -43,6 +44,17 @@ packages_yum_install:
- zip-3.0-23.el8
- git
- tar
- binutils
- xorg-x11-utils
- libXt-devel
- xorg-x11-utils
- make-4.2.1-9.el8
- glibc
- glibc-devel
- libcurl
- ksh
- xorg-x11-xauth
- xterm

# the below vars are defined in multiple groups. Keep the values the same to avoid unexpected behaviour
roles_list: "{{ (ami_roles_list | default([]) | difference(server_type_roles_list | default([]))) + (server_type_roles_list | default([])) }}"
5 changes: 5 additions & 0 deletions ansible/roles/nomis-weblogic-19c/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
nomis_environment: "{{ ec2.tags['nomis-environment'] }}"
weblogic_db_name: "{{ ec2.tags['oracle-db-name'] }}"
weblogic_db_hostname_a: "{{ ec2.tags['oracle-db-hostname-a'] }}"
weblogic_db_hostname_b: "{{ ec2.tags['oracle-db-hostname-b'] }}"
3 changes: 3 additions & 0 deletions ansible/roles/nomis-weblogic-19c/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
dependencies:
- role: get-ec2-facts
35 changes: 35 additions & 0 deletions ansible/roles/nomis-weblogic-19c/tasks/install-rpms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Check installed packages
ansible.builtin.package_facts:

- block:
- name: Create rpms directory
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: oracle
group: oinstall
mode: "0755"
loop:
- /u01/software/jdk

- name: Get rpms from S3 bucket
amazon.aws.aws_s3:
bucket: "{{ image_builder_s3_bucket_name }}"
object: "{{ item }}"
dest: "/u01/software/{{ item }}"
mode: get
overwrite: latest
loop:
- jdk/jdk-8u411-linux-x64.rpm
when: image_builder_s3_bucket_name is defined

- name: Install rpms
ansible.builtin.yum:
name: "/u01/software/{{ item }}"
state: present
loop:
- jdk/jdk-8u411-linux-x64.rpm

# block
when: ansible_facts.packages['jdk'] is not defined
9 changes: 9 additions & 0 deletions ansible/roles/nomis-weblogic-19c/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Rhel8
block:
- import_tasks: install-rpms.yml
tags:
- amibuild
- weblogic_install_jdk

when: ansible_distribution in ['RedHat', 'OracleLinux'] and ansible_distribution_major_version == "8"

0 comments on commit fbf4ce4

Please sign in to comment.