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

GOBMCN2-162 - backup-dest is optional #44

Merged
merged 1 commit into from
Sep 29, 2020
Merged

Conversation

pythiangoryunov
Copy link
Contributor

install-oracle.sh
-- make backup-dest optional
-- ask for backup-dest if no skip-database-config option is used

install-oracle.sh
-- make backup-dest optional
-- ask for backup-dest if no skip-database-config option is used
@pythiangoryunov
Copy link
Contributor Author

The change to make backup-dest optional. However if --skip-database-config option is not used (then play config-db is in place) then backup-dest is asked

Copy link
Member

@mfielding mfielding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although we change the enforcement here, do we need a tag or some other way to actually avoid trying to create the backup dest and backup creation? Or will that be skipped implicitly if we don't use the config-db playbook?

@pythiangoryunov
Copy link
Contributor Author

further on if backup destination starts with "/" it will be created in ora-host role
if it starts with "+" (meaning it should point to disk group) it is checked that the disk group exists

from roles/ora-host/tasks/main.yml
...

  • name: Create backup directory
    file:
    path: "{{ backup_dest }}"
    state: directory
    owner: "{{ oracle_user }}"
    group: "{{ oracle_group }}"
    mode: "ug=rwx"
    when: backup_dest[0:1] == "/"
    tags: os-dirs

  • name: Check ASM backup destination
    set_fact:
    dg_exists: "{{ asm_disks | json_query('[?diskgroup==' + backup_dest[1:] + '].diskgroup') }}"
    when: backup_dest[0:1] == "+"
    tags: backup-dest

  • name: Fail if ASM backup diskgroup not defined
    fail:
    msg: Diskgroup assigned for backup should be defined for creation
    when:

    • backup_dest[0:1] == "+"
    • dg_exists|length == 0
      tags: backup-dest

@pythiangoryunov pythiangoryunov merged commit 4be5680 into master Sep 29, 2020
@pythiangoryunov pythiangoryunov deleted the GOBMCN2-162 branch September 29, 2020 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants