Skip to content

Commit 05eab41

Browse files
committed
Version 2.2.5
- New Feature #19: Automatic linting is now done using Github Actions. Fixed many linting errors - New Feature #20: Added Molecule test scenarios in Pythia - New Feature #21: You can now specify additional runInstaller parameters by using the runinstaller_parameters variable - Fixed #23: Pythia now uses dynamic generated variable role_path when working with templates and files.
1 parent 41c7987 commit 05eab41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1238
-633
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Create a report to help us improve
44
title: "[BUG]"
5-
labels: ''
5+
labels: 'bug'
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
4+
title: '[FEATURE]'
5+
labels: 'enhancement'
66
assignees: ''
77

88
---

.github/workflows/ansible_lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Ansible Lint # feel free to pick your own name
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# Important: This sets up your GITHUB_WORKSPACE environment variable
12+
- uses: actions/checkout@v2
13+
14+
- name: Lint Ansible Playbook
15+
# replace "master" with any valid ref
16+
uses: ansible/ansible-lint-action@master
17+
with:
18+
# [required]
19+
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
20+
# or valid Ansible directories according to the Ansible role
21+
# directory structure.
22+
# If you want to lint multiple ansible files, use the following syntax
23+
# targets: |
24+
# playbook_1.yml
25+
# playbook_2.yml
26+
targets: |
27+
pythia.yml
28+
roles/pythia/
29+
override-deps: |
30+
ansible-lint==5.3.2
31+
args: "-p -x command-instead-of-shell -x risky-shell-pipe -x no-jinja-when"

Changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Changelog of Pythia:
22

3+
Version 2.2.5
4+
- New Feature #19: Automatic linting is now done using Github Actions. Fixed many (really many) linting errors and refactored lots of code
5+
- New Feature #20: Added Molecule test scenarios in Pythia
6+
- New Feature #21: You can now specify additional runInstaller parameters by using the runinstaller_parameters variable
7+
- Fixed #23: Pythia now uses dynamic generated variable role_path when working with templates and files.
8+
39
Version 2.2.0
410
- New Feature #17: Pythia now supports Oracle Database 21c as well as Multitenant / Container Databases
511

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ You can adapt Pythia to your needs by configure variables when running the Playb
3232
Requirements
3333
------------
3434

35-
Pythia requires you to run Ansible 2.7 or higher. The Oracle Software you want to install / configure by Pythia has to be located on a "Staging Area" mounted on the Control Server. Keep in Mind, that you need to licence Oracle Software separately!
35+
Pythia requires you to run Ansible 2.9 or higher. The Oracle Software you want to install / configure by Pythia has to be located on a "Staging Area" mounted on the Control Server. Keep in Mind, that you need to licence Oracle Software separately!
3636

3737
Installation and Configuration
3838
------------------------------

docs/01_GENERAL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ Pythia is based on working with (Ansible) TAGs. When creating the command to run
2222
- duplicate: Specifies, that you want to duplicate a Source Database to a Target Database. Uses RMAN duplicate from active Database. You need to specify the duplicate_source_host, duplicate_target_host, duplicate_source_sid and duplicate_target_sid Variable. As HOSTS you need to specify the Target Host.
2323
- upgrade: Specifies that you want to upgrade a Database to a new Version. You need to specify the Variables oracle_source_version, oracle_target_version, oracle_sid and upgrade_mode when starting the Playbook with the "upgrade" tag.
2424

25+
## Stage Directory
2526

27+
Some tasks of Pythia relate on a so called "local stage directory". In this directory, Pythia searches for the software archives of the Oracle Database. The location of the stage directory is controlled by the variable `local_stage_directory` under `vars/main.yml`. You have to be aware, that Pythia searches for this directory on the Ansible Controlhost. By default, the location is `/mnt/oracle_stage`. You still can control the specific location of a software archive in the `rdbms_dict.yml` and `patch_dict.yml`. But the location can only be underneath the `local_stage_directory`.
2628
## Extra Variables
2729

2830
Beside from specifying a TAG, you need to provide at least these Variable (regardless of which TAG you have specified). You may specify the HOSTS Variable directly in the Playbook, as an Extra Variable or in your Inventory. In these Instructions, we will always hand them over as Extra Variables.

docs/02_INSTALL_RDBMS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ Please also check the `vars/rdbms_dict.yml` and set the following Variables as y
3232
|space_needed_gb|Space approximately in GB for installing the RDBMS. Respects,<br> that there is probably a Patch installed on top|
3333
|desc|Description of the RDBMS|
3434

35+
### Optional Variables
36+
37+
| Variable Name | Description | Default Value |
38+
|---------------|--------------------------|---------------|
39+
|runinstaller_parameters|Additional runinstaller parameters during installation<br>of Oracle software. For example `-ignoreInternalDriverError`.|`NONE`|
3540
## Examples
3641

3742
Example: Install Oracle RDBMS with Version 18c as Standard Edition 2 on Host "ansibletest":

docs/99_MOLECULE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# General Informations
2+
Pythia has implemented some Molecule test scenarios. This section describes which scenarios there are and how to run them.
3+
4+
5+
# Prerequisites
6+
7+
In order to run Molecule tests for Pythia, there are some prerequisites, that need to be fullfilled.
8+
9+
- A Linux Host / VM (e.G. Ubuntu 20.04)
10+
- Python3 with pip installed
11+
- Docker installed (see (here)[https://docs.docker.com/engine/install/ubuntu/])
12+
- Molecule with Docker Module installed (see (here)[https://thedatabaseme.de/2022/01/17/automated-testing-your-ansible-role-with-molecule-and-github-actions/])
13+
- This repository cloned on the Host / VM you prepared
14+
- A `local_stage_directory` is attached to the Host / VM with Oracle Database software in version 21c.
15+
16+
17+
# Molecule scenarios
18+
19+
The following scenarios are implemented as Molecule tests:
20+
21+
- `install_rdbms`: Installs an Oracle DB RDBMS in version 21c.
22+
- `install_db`: Installs an Oracle DB on one an existing RDBMS. Be aware, this will not work on an "empty" Docker Image without an Oracle Database installed.
23+
- `install_patch`: Installs an Oracle DB patch on one or many existing databases. Be aware, this will not work on an "empty" Docker Image without an Oracle Database installed.
24+
- `install_rdbms_db_patch`: This will do everything and is also the `default` Molecule test scenario.
25+
26+
# Run a Molecule test
27+
28+
To run a Molecule test, head to the roles root directory (`roles/pythia/`) and run molecule with the wanted scenario. Here is an example:
29+
30+
- molecule test -s install_rdbms_db_patch
31+
32+
If you don't want to get the container destroyed after a test run, add the `--destroy=never` parameter to your `molecule` command.

pythia.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- hosts: "{{ HOSTS | default('all') }}"
2+
become: true
23
become_user: root
3-
4+
45
roles:
56
- roles/pythia

roles/pythia/.yamllint

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# Based on ansible-lint config
3+
extends: default
4+
5+
rules:
6+
braces:
7+
max-spaces-inside: 1
8+
level: error
9+
brackets:
10+
max-spaces-inside: 1
11+
level: error
12+
colons:
13+
max-spaces-after: -1
14+
level: error
15+
commas:
16+
max-spaces-after: -1
17+
level: error
18+
comments: disable
19+
comments-indentation: disable
20+
document-start: disable
21+
empty-lines:
22+
max: 3
23+
level: error
24+
hyphens:
25+
level: error
26+
indentation: disable
27+
key-duplicates: enable
28+
line-length: disable
29+
new-line-at-end-of-file: disable
30+
new-lines:
31+
type: unix
32+
trailing-spaces: disable
33+
truthy: disable

0 commit comments

Comments
 (0)