-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update oracle_db_pass if oracle_db_user already exists
- Loading branch information
Showing
2 changed files
with
10 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
#!/bin/sh | ||
# {{ ansible_managed }} | ||
|
||
source /home/{{ oracle_user }}/.bashrc | ||
|
||
# create the user if it doesn't exist, update the password if it does | ||
sqlplus / as sysdba <<EOT | ||
CREATE USER {{ oracle_db_user }} IDENTIFIED BY {{ oracle_db_pass }}; | ||
ALTER USER {{ oracle_db_user }} IDENTIFIED BY {{ oracle_db_pass }}; | ||
GRANT connect, resource TO {{ oracle_db_user }}; | ||
exit; | ||
EOT |