Skip to content

Commit

Permalink
molecule: new stage golden to create golden images
Browse files Browse the repository at this point in the history
  • Loading branch information
Rendanic committed Sep 26, 2023
1 parent de013d7 commit 4fd0869
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelogs/fragments/molecule1.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
minor_changes:
- "molecule: new stage download to prepare dbfs stage (oravirt#381)"
- "molecule: new stage golden to create golden images (oravirt#381)"

bugfixes:
- "molecule: Use shared inventory with download scenario (oravirt#381)"
5 changes: 5 additions & 0 deletions extensions/molecule/golden/collections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
collections:
# Use current directory as collection source
- source: ./..
type: dir
18 changes: 18 additions & 0 deletions extensions/molecule/golden/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# - name: Converge os
# ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.os

# - name: Converge swdb
# ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.swdb
# vars:
# # install it directly from remote in this test
# # => Do not copy the installation media into container
# oracle_sw_copy: false
# is_sw_source_local: true
# oracle_stage_remote: /vagrant

# - name: Side-Effect - DB-Patching 19.20
# ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.opatch

- name: Converge oraswdb_golden_image
ansible.builtin.import_playbook: opitzconsulting.ansible_oracle.golden_images
27 changes: 27 additions & 0 deletions extensions/molecule/golden/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
dependency:
name: galaxy
enabled: true

driver:
name: docker
platforms:
- name: ol
image: "quay.io/rendanic/docker-${MOLECULE_DISTRO:-ol8}-ansible:latest"
pre_build_image: true
# The following 4 lines are needed only for making systemd work
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /vagrant:/vagrant:ro
cgroupns_mode: host
privileged: true

verifier:
name: ansible

provisioner:
name: ansible
inventory:
links:
group_vars: ../shared_config/inventory/group_vars/
10 changes: 10 additions & 0 deletions extensions/molecule/golden/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
ansible.builtin.assert:
that: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# is_sw_source_local: false
# oracle_sw_source_www: http://10.0.2.15:8080

oraswdb_golen_image_create: true
golden_image_dest: /u01/golden

oracle_sw_source_local: /vagrant

apply_patches_db: true
Expand Down

0 comments on commit 4fd0869

Please sign in to comment.