Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orautostart #78

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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$'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that the actual property is updated, for example what if we add another property to this file

replace: '\1:Y'
backup: yes
Loading