Skip to content

Commit

Permalink
oradb_manage_pdb: added missing defaults for pdbadmin_user and pdbadm…
Browse files Browse the repository at this point in the history
…in_password
  • Loading branch information
Rendanic committed Apr 16, 2024
1 parent 2d081f4 commit 3983fc8
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/pdbadmin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- "oradb_manage_pdb: added missing defaults for pdbadmin_user and pdbadmin_password ()"
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ oracle_pdbs:
- cdb: DB1
home: db19-si-ee
pdb_name: ORCLPDB
pdbadmin_user: PDBROOT
listener_port: 1521
state: present
datafile_dest: /u01/app/oracle/oradata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ oracle_wallet_password:
wallet1: "aA_{{ ansible_machine_id }}"

default_dbpass: Oracle_123
# dbpasswords:
# DB1:
# sys: Oracle_123
# ORCLPDB:
# sys: Oracle_123
dbpasswords:
DB1:
SYS: Oracle123
ORCLPDB:
PDBROOT: pdb
29 changes: 29 additions & 0 deletions roles/oradb_manage_pdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Manage pluggable databases in Oracle
## Table of content

- [Requirements](#requirements)
- [Default Variables](#default-variables)
- [pdbadmin_password](#pdbadmin_password)
- [pdbadmin_user](#pdbadmin_user)
- [Discovered Tags](#discovered-tags)
- [Dependencies](#dependencies)
- [License](#license)
Expand All @@ -16,6 +19,32 @@ Manage pluggable databases in Oracle

- Minimum Ansible version: `2.14.0`

## Default Variables

### pdbadmin_password

Password for pdb_admin user.

#### Default value

```YAML
pdbadmin_password: >-
{{ dbpasswords[odb.1.cdb][odb.1.pdb_name][pdbadmin_user] | default(default_dbpass)
}}
```
### pdbadmin_user
Default pdb_admin user for newly created PDBs.
Could be set in `oracle_pdbs` to define different pdb_admin user for each PDB.

#### Default value

```YAML
pdbadmin_user: >-
{{ odb[1].pdbadmin_user | default('PDBADMIN') }}
```

## Discovered Tags

Expand Down
13 changes: 13 additions & 0 deletions roles/oradb_manage_pdb/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
---
# @var pdbadmin_user:description: >
# Default pdb_admin user for newly created PDBs.
#
# Could be set in `oracle_pdbs` to define different pdb_admin user for each PDB.
# @end
pdbadmin_user: >-
{{ odb[1].pdbadmin_user | default('PDBADMIN') }}
# @var pdbadmin_password:description: >
# Password for pdb_admin user.
# @end
pdbadmin_password: >-
{{ dbpasswords[odb.1.cdb][odb.1.pdb_name][pdbadmin_user] | default(default_dbpass) }}

0 comments on commit 3983fc8

Please sign in to comment.