Skip to content

Commit

Permalink
Orautostart (#78)
Browse files Browse the repository at this point in the history
* try with github action

* add verification in molecule test
  • Loading branch information
huangjien authored Apr 12, 2024
1 parent 9a55873 commit 28ba2c9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.4
version: 1.5.6

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
12 changes: 12 additions & 0 deletions molecule/__oracle-v19c/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,15 @@
stat:
path: /etc/systemd/system/oracle.service
register: service_file

- name: Check if all /etc/oratab entries end with 'Y'
shell: "grep -v '^#' /etc/oratab | awk -F':' '{print $NF}' | grep -vx 'Y'"
register: oratab_check
ignore_errors: true

- name: Assert all entries end with 'Y'
assert:
that:
- oratab_check.stdout == ""
success_msg: "All /etc/oratab entries correctly end with 'Y'."
fail_msg: "Some /etc/oratab entries do not end with 'Y'."
6 changes: 3 additions & 3 deletions roles/oracle/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ oracle_home: "/opt/oracle/product/{{ oracle_family }}/dbhome_1"
oracle_inventory: /opt/Oracle/oraInventory # only used for 12c
oracle_global_name: "orcl.{{ ansible_domain }}"
oracle_sid: orcl
oracle_admin_password: dummyPassword
oracle_admin_password: dummyPassword0
sql_username: curam
sql_password: dummyPassword
enc_sql_password: dummyPassword
sql_password: dummyPassword0
enc_sql_password: dummyPassword0

# Bootstrap config
bootstrap_dateformat: 'dd MM yyyy'
Expand Down
7 changes: 7 additions & 0 deletions roles/oracle/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@

- name: Props and Profile
include_tasks: "dot_profile.yml"

- name: Update oratab to autostart
replace:
path: /etc/oratab
regexp: '^(.*):N$'
replace: '\1:Y'
backup: yes

0 comments on commit 28ba2c9

Please sign in to comment.