Skip to content

Commit

Permalink
oradb-manage-*: reduced output during execution with loop_control
Browse files Browse the repository at this point in the history
oradb-manage-grants
oradb-manage-tablespace
oradb-manage-users
  • Loading branch information
Rendanic committed Oct 20, 2018
1 parent ed52987 commit 52bff74
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/oradb-manage-grants/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
when: oracle_databases is defined and item.0.state|lower == 'present' and item.1.grants is defined
run_once: "{{ configure_cluster }}"
become_user: "{{ oracle_user }}"
loop_control:
label: "port: {{ listener_port_template }} service: {{ db_service_name }} role: {{ item.1.name | default('none') }} grants: {{ item.1.grants | default('empty') }} state: {{ item.1.state }}"
tags: users,grants

- name: Manage role grants (pdb)
Expand All @@ -42,6 +44,8 @@
when: oracle_pdbs is defined and item.0 is defined and item.0.state|lower == 'present' and item.1.grants is defined
run_once: "{{ configure_cluster }}"
become_user: "{{ oracle_user }}"
loop_control:
label: "port: {{ listener_port_template }} service: {{ db_service_name }} role: {{ item.1.name | default('none') }} grants: {{ item.1.grants | default('empty') }} state: {{ item.1.state }}"
tags: users,grants

- name: Manage schema grants (cdb)
Expand All @@ -64,6 +68,8 @@
when: oracle_databases is defined and item.0.state|lower == 'present' and item.1.grants is defined
run_once: "{{ configure_cluster }}"
become_user: "{{ oracle_user }}"
loop_control:
label: "port: {{ listener_port_template }} service: {{ db_service_name }} schema: {{ item.1.schema }} grants: {{ item.1.grants | default('empty') }} state: {{ item.1.state }}"
tags: users,grants

- name: Manage schema grants (pdb)
Expand All @@ -86,4 +92,6 @@
when: oracle_pdbs is defined and item.0 is defined and item.0.state|lower == 'present' and item.1.grants is defined
run_once: "{{ configure_cluster }}"
become_user: "{{ oracle_user }}"
loop_control:
label: "port: {{ listener_port_template }} service: {{ db_service_name }} role: {{ item.1.name | default('none') }} grants: {{ item.1.grants | default('empty') }} state: {{ item.1.state }}"
tags: users,grants
4 changes: 4 additions & 0 deletions roles/oradb-manage-tablespace/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- tablespaces
- flags:
skip_missing: True
loop_control:
label: "port: {{ listener_port_template }} service: {{ db_service_name }} tablespace: {{ item.1.name }} content: {{ item.1.content |default(omit)}} state: {{ item.1.state |default('present')}}"
when: oracle_databases is defined and item.1 is defined and item.0.state |upper == 'PRESENT'
tags: tablespace

Expand Down Expand Up @@ -50,4 +52,6 @@
- flags:
skip_missing: True
when: oracle_pdbs is defined and item.1 is defined and item.0.state |upper == 'PRESENT'
loop_control:
label: "port: {{ listener_port_template }} service: {{ item.0.pdb_name }} tablespace: {{ item.1.name }} content: {{ item.1.content |default(omit)}} state: {{ item.1.state |default('present')}}"
tags: tablespace
4 changes: 4 additions & 0 deletions roles/oradb-manage-users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
when: oracle_databases is defined and item.0.state|lower == 'present' and item.1 is defined
run_once: "{{ configure_cluster }}"
become_user: "{{oracle_user}}"
loop_control:
label: "port: {{ listener_port_template }} service: {{ db_service_name }} schema: {{ item.1.schema }} state:{{ item.1.state }}"
tags: users

- name: Manage users (pdb)
Expand All @@ -50,4 +52,6 @@
when: oracle_pdbs is defined and item.0.state|lower == 'present' and item.1 is defined
run_once: "{{ configure_cluster }}"
become_user: "{{oracle_user}}"
loop_control:
label: "port: {{ listener_port_template }} service: {{ item.0.pdb_name }} schema: {{ item.1.schema }} state:{{ item.1.state }}"
tags: users

0 comments on commit 52bff74

Please sign in to comment.