File tree Expand file tree Collapse file tree 14 files changed +419
-2
lines changed
extensions/molecule/shared_config/inventory/group_vars/all
roles/oradb_manage_wallet Expand file tree Collapse file tree 14 files changed +419
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ minor_changes :
3+ - " oradb_manage_wallet: New role for managing Oracle Wallets ()"
Original file line number Diff line number Diff line change @@ -160,3 +160,32 @@ tnsnames_installed:
160160 - tnsname : " {{ oracle_pdbs[0]['pdb_name'] }}"
161161 home : db19-si-ee
162162 state : present
163+
164+ sqlnet_config :
165+ sqlnetalias1 :
166+ - {name: "ADR_BASE", value: "/u01/app/oracle/"}
167+ - {name: "SQLNET.ALLOWED_LOGON_VERSION_CLIENT", value: 12}
168+ - {name: "SQLNET.WALLET_OVERRIDE", value: 'TRUE'}
169+ - name : WALLET_LOCATION
170+ value : |-
171+ (
172+ SOURCE =
173+ (METHOD = FILE)(METHOD_DATA = (DIRECTORY=/u01/app/oracle/wallet))
174+ )
175+
176+ sqlnet_installed :
177+ - home : db19-si-ee
178+ sqlnet : sqlnetalias1
179+ state : present
180+
181+ oracle_wallet_config :
182+ - name : wallet1
183+ home : db19-si-ee
184+ path : /u01/app/oracle/wallet
185+ state : present
186+ # mode: g+rx
187+ dbcredentials :
188+ - tns_name : oracle_pdbs[0]['pdb_name']
189+ db_name : oracle_pdbs[0]['pdb_name']
190+ db_user : system
191+ state : present
Original file line number Diff line number Diff line change 1+ ---
2+ oracle_wallet_password :
3+ wallet1 : " aA_{{ ansible_machine_id }}"
Original file line number Diff line number Diff line change 44 become : true
55 any_errors_fatal : true
66 roles :
7+ - opitzconsulting.ansible_oracle.oradb_manage_wallet
78 - opitzconsulting.ansible_oracle.oradb_manage_db
89 - opitzconsulting.ansible_oracle.oradb_manage_pdb
910 - opitzconsulting.ansible_oracle.oradb_manage_parameters
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Manage Oracle wallet
3+ hosts : " {{ hostgroup | default('all') }}"
4+ any_errors_fatal : true
5+ roles :
6+ - opitzconsulting.ansible_oracle.oradb_manage_wallet
Original file line number Diff line number Diff line change 1+ ---
2+ logging :
3+ level : warning
4+ template : readme
5+ force_overwrite : true
Original file line number Diff line number Diff line change 11# oradb_manage_wallet
22
3+ Manage Wallets for Oracle with ` mkstore ` .
4+
5+ Multiple wallets with different locations are possivle.
6+ Define a password for the wallet in ` oracle_wallet_password ` .
7+
38## Table of content
49
510- [ Requirements] ( #requirements )
11+ - [ Default Variables] ( #default-variables )
12+ - [ oracle_wallet_config] ( #oracle_wallet_config )
13+ - [ oracle_wallet_password] ( #oracle_wallet_password )
14+ - [ Discovered Tags] ( #discovered-tags )
615- [ Dependencies] ( #dependencies )
716- [ License] ( #license )
817- [ Author] ( #author )
1120
1221## Requirements
1322
14- None.
23+ - Minimum Ansible version: ` 2.15.0 `
24+
25+ ## Default Variables
26+
27+ ### oracle_wallet_config
28+
29+ #### Default value
30+
31+ ``` YAML
32+ oracle_wallet_config : []
33+ ` ` `
34+
35+ #### Example usage
36+
37+ ` ` ` YAML
38+ oracle_wallet_config :
39+ - name : wallet1
40+ home : 19300_base
41+ path : /u01/app/oracle/wallet
42+ state : present
43+ dbcredential :
44+ - tns_name : db1
45+ db_name : db1
46+ db_user : user1
47+ state : present
48+ ` ` `
49+
50+ ### oracle_wallet_password
1551
52+ #### Default value
1653
54+ ` ` ` YAML
55+ oracle_wallet_password : {}
56+ ` ` `
57+
58+ #### Example usage
59+
60+ ` ` ` YAML
61+ oracle_wallet_password :
62+ wallet1 : <password>
63+ wallet2 : <password>
64+ ` ` `
65+
66+ ## Discovered Tags
67+
68+ **_always_**
1769
1870
1971## Dependencies
2072
21- None.
73+ - orasw_meta
74+
75+ ## License
76+
77+ license (MIT)
78+
79+ ## Author
80+
81+ [Thorsten Bruhns]
Original file line number Diff line number Diff line change 1+ ---
2+ # @var oracle_wallet_password:description: >
3+ # @end
4+ oracle_wallet_password : {}
5+ # @var oracle_wallet_password:example: >
6+ # oracle_wallet_password:
7+ # wallet1: <password>
8+ # wallet2: <password>
9+ # @end
10+
11+ # @var oracle_wallet_config:description: >
12+ oracle_wallet_config : []
13+
14+ # See below example for more details.
15+ # oracle_wallet_config:
16+ # - name: <name for password entry>
17+ # home: <dict key from db_homes_config>
18+ # path: <target directory for wallet>
19+ # owner: <OS-Owner - default oracle_owner>
20+ # group: <OS-Group | default(omit)>
21+ # mode: <chmod auf path | default(omit)>
22+ # state: present/absent
23+ # certificates: <optional>
24+ # - type: ca
25+ # cert: <certificate>
26+ # state: present/absent
27+ # dbcredential: <optional>
28+ # - tns_name: <tns-alias from
29+ # db_name: <db_name for dbpasswords[db_name]>
30+ # db_user: <database user>
31+ # state: present/absent
32+ # @end
33+ #
34+ # @var oracle_wallet_config:example: >
35+ # oracle_wallet_config:
36+ # - name: wallet1
37+ # home: 19300_base
38+ # path: /u01/app/oracle/wallet
39+ # state: present
40+ # dbcredential:
41+ # - tns_name: db1
42+ # db_name: db1
43+ # db_user: user1
44+ # state: present
45+ # @end
Original file line number Diff line number Diff line change 1+ ---
2+ # @meta description: >
3+ # Manage Wallets for Oracle with `mkstore`.
4+ #
5+ # Multiple wallets with different locations are possivle.
6+ # Define a password for the wallet in `oracle_wallet_password`.
7+
8+ # The following credentials could be managed by this role:
9+ #
10+ # `database credentials:`
11+ #
12+ # We need the `db_name` as attribute for finding the password in `dbpasswords`.
13+ # Be aware that `tns_name` could be different to the `db_name`.
14+ # @end
15+ # @meta author: [Thorsten Bruhns]
16+ galaxy_info :
17+ role_name : oradb_manage_wallet
18+ author : Thorsten Bruhns
19+ description : Manage Wallets for Oracle
20+ company : Thorsten Bruhns
21+
22+ license : license (MIT)
23+
24+ min_ansible_version : 2.15.0
25+
26+ platforms :
27+ - name : EL
28+ versions :
29+ - " 6"
30+ - " 7"
31+ - " 8"
32+ - " 9"
33+
34+ galaxy_tags :
35+ - database
36+ - oracle
37+ - wallet
38+
39+ dependencies :
40+ - role : orasw_meta
Original file line number Diff line number Diff line change 1+ ---
2+ - name : assert | assert wallet
3+ when :
4+ - oracle_wallet_config is defined
5+ block :
6+ - name : assert | assert oracle_wallet_config
7+ ansible.builtin.assert :
8+ quiet : true
9+ that :
10+ - owc.state is defined
11+ - owc.state in ('present', 'absent')
12+ - owc.name is defined
13+ - owc.path is defined
14+ - owc.home is defined
15+ - db_homes_config[owc.home] is defined
16+ - oracle_wallet_password[owc.name] is defined
17+ with_items :
18+ - " {{ oracle_wallet_config }}"
19+ loop_control :
20+ label : >-
21+ {{ owc.name | default('') }}
22+ {{ owc.path | default('') }}
23+ {{ owc.state | default('') }}
24+ loop_var : owc
25+
26+ # owc_dbc due to with_subelements instead of dbc_d!
27+ - name : assert | assert dbcredential in oracle_wallet_config
28+ ansible.builtin.assert :
29+ quiet : true
30+ that :
31+ - owc_dbc.1.tns_name is defined
32+ - owc_dbc.1.db_name is defined
33+ - owc_dbc.1.db_user is defined
34+ - owc_dbc.1.state in ('present', 'absent')
35+ fail_msg : attribute missing or duplicate tns_name in wallet
36+ with_subelements :
37+ - " {{ oracle_wallet_config }}"
38+ - dbcredentials
39+ - flags :
40+ skip_missing : true
41+ loop_control :
42+ label : >-
43+ {{ owc_dbc.0.name | default('') }}
44+ {{ owc_dbc.1.tns_name | default('') }}
45+ {{ owc_dbc.1.state | default('') }}
46+ loop_var : owc_dbc
47+ when :
48+ - owc_dbc.0.state == 'present'
49+ - owc_dbc.1 is defined
You can’t perform that action at this time.
0 commit comments