Skip to content

Commit

Permalink
update oracle_db_pass if oracle_db_user already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ellotheth committed Jan 27, 2014
1 parent aeeb059 commit b4e98e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ commented.
roles:
# more roles here
- oracle

## TODO

- Handle multiple runs with different `oracle_db_home` and/or `oracle_db_name`
vars, instead of skipping the whole installation process.
- Optionally allow Oracle installer file downloads from S3 (e.g. with
[the s3 module](http://docs.ansible.com/s3_module.html)).
3 changes: 3 additions & 0 deletions templates/sqlplus_user_setup.sh.j2
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

0 comments on commit b4e98e8

Please sign in to comment.