Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.1.0 #383

Merged
merged 12 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ansible-lint V6.20.3
  • Loading branch information
Rendanic committed Oct 11, 2023
commit 197b94b25cee5d618fca36149a02bca89213d0b3
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ skip_list:
# ansible-oracle has lot of internal used variables...
- var-naming[no-role-prefix]
- name[casing]
- meta-runtime[unsupported-version]

exclude_paths:
- .github
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v2

- name: Lint roles
uses: ansible-community/ansible-lint-action@v6.17.0
uses: ansible/ansible-lint@v6.20.3
with:
targets: |
inventory/*
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
entry: ansible-doctor -r -f roles

- repo: https://github.com/ansible-community/ansible-lint.git
rev: v6.17.0
rev: v6.20.3
hooks:
- id: ansible-lint
entry: ansible-lint --force-color -p
Expand Down
3 changes: 3 additions & 0 deletions changelogs/fragments/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- "ansible-lint V6.20.3 ()"
2 changes: 2 additions & 0 deletions roles/oradb_datapatch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ansible.builtin.shell: "export PATH=${ORACLE_HOME}/bin:${PATH}; lsnrctl start {{ lsnrinst.listener_name }} /dev/null; exit 0"
# noqa no-changed-when
environment: "{{ oracle_env_lsnrctl }}"
become: true
become_user: "{{ oracle_user }}"
with_items: "{{ listener_installed }}"
loop_control:
Expand All @@ -22,6 +23,7 @@
db_unique_name: "{{ odb.oracle_db_unique_name | default(omit) }}"
sid: "{{ odb.oracle_db_instance_name | default(omit) }}"
state: started
become: true
become_user: "{{ oracle_user }}"
with_items: "{{ oracle_databases | selectattr('state', 'match', 'present') }}"
loop_control:
Expand Down
1 change: 1 addition & 0 deletions roles/oradb_manage_db/tasks/manage-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
output: verbose
state: "{{ odb.state }}"
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
when: odb.state == 'absent'
register: dbca_remove
Expand Down
4 changes: 4 additions & 0 deletions roles/oradb_manage_grants/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- odb.0.state == 'present'
- (odb.1.grants is defined or odb.1.object_privs is defined)
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: odb
Expand Down Expand Up @@ -63,6 +64,7 @@
- opdb.0.state == 'present'
- (opdb.1.grants is defined or opdb.1.object_privs is defined)
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: opdb
Expand Down Expand Up @@ -103,6 +105,7 @@
- odb.0.state == 'present'
- (odb.1.grants is defined or odb.1.object_privs is defined)
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: odb
Expand Down Expand Up @@ -141,6 +144,7 @@
- opdb.0.state == 'present'
- (opdb.1.grants is defined or opdb.1.object_privs is defined)
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: opdb
Expand Down
3 changes: 3 additions & 0 deletions roles/oradb_manage_parameters/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- oracle_databases is defined
- odb.0.state == 'present'
- odb.1 is defined
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: odb
Expand Down Expand Up @@ -63,6 +64,7 @@
- oracle_pdbs is defined
- opdb.0.state == 'present'
- opdb.1 is defined
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: opdb
Expand Down Expand Up @@ -100,6 +102,7 @@
label: >-
dbname: {{ odb.0.oracle_db_name | d('') }}
- {{ param_change_reboot.msg | default('restart_spparameter_changed is false') }}"
become: true
become_user: "{{ oracle_user }}"
register: param_change_reboot
tags: spfile_bounce
2 changes: 2 additions & 0 deletions roles/oradb_manage_roles/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
role {{ odb.1.name }}
state {{ odb.1.state }}
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
tags: users,grants

Expand Down Expand Up @@ -60,5 +61,6 @@
role: {{ opdb.1.name }},
state: {{ opdb.1.state }}
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
tags: users,grants
8 changes: 8 additions & 0 deletions roles/oradb_manage_services/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- odb.0.state == 'present'
- odb.1 is defined
- (odb.1.state == 'present' or odb.1.state == 'started')
become: true
become_user: "{{ oracle_user }}"
tags: create_service,services

Expand Down Expand Up @@ -61,6 +62,7 @@
- item.0.state == 'present'
- item.1 is defined
- (item.1.state == 'present' or item.1.state == 'started')
become: true
become_user: "{{ oracle_user }}"
tags: create_service,services

Expand All @@ -87,6 +89,7 @@
- item.0.state | lower == 'present'
- item.1 is defined
- item.1.state == 'started'
become: true
become_user: "{{ oracle_user }}"
tags: start_service,services

Expand All @@ -112,6 +115,7 @@
- oracle_pdbs is defined
- item.0.state == 'present'
- item.1 is defined and item.1.state == 'started'
become: true
become_user: "{{ oracle_user }}"
tags: start_service,services

Expand All @@ -138,6 +142,7 @@
- item.0.state | lower == 'present'
- item.1 is defined
- item.1.state == 'stopped' or item.1.state == 'absent'
become: true
become_user: "{{ oracle_user }}"
tags: start_service,services

Expand All @@ -164,6 +169,7 @@
- item.0.state | lower == 'present'
- item.1 is defined
- item.1.state == 'stopped' or item.1.state == 'absent'
become: true
become_user: "{{ oracle_user }}"
tags: start_service,services

Expand All @@ -190,6 +196,7 @@
- item.0.state | lower == 'present'
- item.1 is defined
- item.1.state == 'absent'
become: true
become_user: "{{ oracle_user }}"
tags: start_service,services

Expand All @@ -216,5 +223,6 @@
- item.0.state == 'present'
- item.1 is defined
- item.1.state == 'absent'
become: true
become_user: "{{ oracle_user }}"
tags: start_service,services
3 changes: 3 additions & 0 deletions roles/oradb_manage_statspack/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
- odb.0.state == 'present'
- odb.0.statspack is defined
- odb.0.statspack.state == 'present'
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: odb
Expand Down Expand Up @@ -169,6 +170,7 @@
- odb.0.state == 'present'
- odb.0.statspack is defined
- odb.0.statspack.state == 'present'
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: odb
Expand Down Expand Up @@ -302,6 +304,7 @@
- opdb.0.state == 'present'
- opdb.0.statspack is defined
- opdb.0.statspack.state == 'present'
become: true
become_user: "{{ oracle_user }}"
tags:
- spjob
Expand Down
2 changes: 2 additions & 0 deletions roles/oradb_manage_users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- odb.0.state == 'present'
- odb.1 is defined
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
loop_control:
loop_var: odb
Expand Down Expand Up @@ -73,6 +74,7 @@
- opdb.1.schema is defined
- opdb.1.state is defined
run_once: "{{ _oraswgi_meta_configure_cluster }}"
become: true
become_user: "{{ oracle_user }}"
loop_control:
label: >-
Expand Down
1 change: 1 addition & 0 deletions roles/oradb_rman/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
- wallet

- name: Register Database in RMAN Catalog
become: true
become_user: "{{ oracle_user }}"
ansible.builtin.shell:
cmd: "$ORACLE_HOME/bin/rman target / catalog $CONNECTSTRING"
Expand Down
6 changes: 6 additions & 0 deletions roles/oradb_tzupgrade/tasks/cdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
scope: pdbs
pdb_list: "CDB$ROOT PDB$SEED"
become_user: "{{ oracle_user }}"
become: true

- name: oradb_tzupgrade | Upgrade timezone for CDB$ROOT and PDB$SEED
opitzconsulting.ansible_oracle.oracle_sqldba:
Expand All @@ -18,6 +19,7 @@
scope: pdbs
pdb_list: "CDB$ROOT PDB$SEED"
become_user: "{{ oracle_user }}"
become: true

- name: oradb_tzupgrade | Get all open PDBs
opitzconsulting.ansible_oracle.oracle_sqldba:
Expand All @@ -28,6 +30,7 @@
oracle_home: "{{ _oracle_home_db }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become_user: "{{ oracle_user }}"
become: true
register: pdbs_info

- name: oradb_tzupgrade | Set facts for pdbs_info
Expand All @@ -51,6 +54,7 @@
pdb_list: "{{ _oradb_tzupgrade_candidate_pdbs }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become_user: "{{ oracle_user }}"
become: true

- name: oradb_tzupgrade | Upgrade timezone for the candidate PDBs
opitzconsulting.ansible_oracle.oracle_sqldba:
Expand All @@ -61,6 +65,7 @@
pdb_list: "{{ _oradb_tzupgrade_candidate_pdbs }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become_user: "{{ oracle_user }}"
become: true

- name: oradb_tzupgrade | Get post upgrade timezone status info
opitzconsulting.ansible_oracle.oracle_sqldba:
Expand All @@ -82,6 +87,7 @@
oracle_home: "{{ _oracle_home_db }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become_user: "{{ oracle_user }}"
become: true
changed_when: false
register: post_status_info

Expand Down
3 changes: 3 additions & 0 deletions roles/oradb_tzupgrade/tasks/non_cdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
creates_sql: "{{ _oradb_tzupgrade_tz_check_query }}"
oracle_home: "{{ _oracle_home_db }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become: true
become_user: "{{ oracle_user }}"

- name: oradb_tzupgrade | Apply the timezone upgrade for the non-CDB database
Expand All @@ -13,6 +14,7 @@
creates_sql: "{{ _oradb_tzupgrade_tz_check_query }}"
oracle_home: "{{ _oracle_home_db }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become: true
become_user: "{{ oracle_user }}"

- name: oradb_tzupgrade | Get post upgrade timezone status info
Expand All @@ -28,6 +30,7 @@
FROM database_properties WHERE property_name LIKE 'DST_PRIMARY_TT_VERSION';
oracle_home: "{{ _oracle_home_db }}"
oracle_db_name: "{{ _oracle_db_instance_name }}"
become: true
become_user: "{{ oracle_user }}"
changed_when: false
register: post_status_info
Expand Down
2 changes: 1 addition & 1 deletion tools/dev/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# . ~/venv/ansible-oracle/bin/activate
# pip --require-virtualenv -v install -r tools/dev/requirements_dev.txt
#
ansible-lint==6.17.0
ansible-lint==6.20.3
ansible-navigator==3.4.0
pre-commit==3.4.0

Expand Down