Actifio.appaware_mount
ansible_appaware_mount
=====================
This is an Ansible role designed to perform Actifio AppAware mounts for Oracle DB (on UNIX/Linux-like systems) and SQL Server DB/Instance.
Requirements
You need Oracle or SQL Server binaries installed on the target host. To install Oracle Database, you can use the "kosalaat.oracle_install" role from Ansible Galaxy.
Note: For the Actifio AppAware mount, you don't need to create a database. The setting install_mode=INSTALL_DB_SWONLY
is sufficient.
Role Variables
Here are the variables you can use with this role:
Actifio Appliance Related
Variable Name | Description | Required (Y/N) |
---|---|---|
act_appliance | Actifio Appliance IP or FQDN. | Y |
act_user | Actifio username (must have System Manage privileges). | Y |
act_pass | Password for the Actifio user. | Y |
act_appname | Application name. | Y |
act_src_host | Source host where the application is protected. | Y |
act_restoretime | Desired time to recover the database. | N |
strict_policy | Related to act_restoretime. | N |
act_dest_host | Destination host to mount the database (defaults to ansible_host if not specified). | N |
act_job_class | Options include snapshot, dedup, dedupasync, liveclone, syncback, and OnVault. | N |
act_nowait_mount | If true, waits for the mount job to finish; otherwise returns immediately. | N |
act_pre_script | Pre-mount script (must be located in the specified directory). | N |
act_post_script | Post-mount script (must be located in the specified directory). | N |
Oracle Related
Variable Name | Description | Required (Y/N) |
---|---|---|
ora_home | Oracle Home Directory. | Y |
ora_db_name | Oracle DB Name or new SID. | Y |
ora_username | Oracle OS user (defaults to oracle). | N |
ora_rac_nodelist | List of Oracle RAC nodes for RAC mounts. | N |
ora_asm_diskgroup | Diskgroup name for ASM mounts. | N |
ora_tns_admin | Oracle TNS_ADMIN path. | N |
ora_db_mem | Memory Target (defaults to 512MB). | N |
ora_sga_pct | Percentage of SGA from total memory. | N |
ora_redo_size | Redo Log size in MB (defaults to 500). | N |
ora_shared_pool | Oracle Shared Pool size. | N |
ora_db_cache_size | Oracle DB Cache size. | N |
ora_recover_dest_size | Oracle Parameter db_recover_dest_size (defaults to 5000). | N |
ora_diagnostic_dest | Oracle Diagnostic Destination. | N |
ora_nprocs | Max number of processes allowed. | N |
ora_open_cursors | Number of open cursors (defaults to 1000). | N |
ora_char_set | Character set (defaults to 'AL32UTF8'). | N |
ora_tns_ip | TNS IP Address. | N |
ora_tns_port | TNS Port. | N |
ora_tns_domain | TNS Domain. | N |
ora_no_nid | Do not change DBID of the new clone (defaults to FALSE). | N |
ora_no_tns_update | Do not update TNS records (defaults to FALSE). | N |
ora_restore_recov | Recover the Oracle database (defaults to TRUE). | N |
ora_no_rac | Treat as Oracle RAC (defaults to TRUE). | N |
SQLServer Related
Variable Name | Description | Required (Y/N) |
---|---|---|
sql_instance_name | Target SQL Server instance name. | Y |
sql_db_name | Database name at the target instance (required for specific applications). | Y |
sql_source_dbnames | Source database names if from a SQL instance (comma-separated). | Y |
sql_cg_name | Consistency group name (required when mounting multiple databases from SQL Server). | Y |
sql_recover | Recover database (defaults to TRUE). | N |
sql_userlogins | Recover user logins for the database (defaults to FALSE). | N |
sql_username | Username for database provisioning. | N |
sql_password | Password for the specified user. | N |
sql_dbname_prefix | Prefix for multiple database mount names. | N |
sql_dbname_suffix | Suffix for multiple database mount names. | N |
Example Playbook
Oracle Example
- name: Testing mount points
hosts: "{{ host_group }}"
become: yes
become_method: sudo
roles:
- { role: ansible_appaware_mount, act_appliance: my-actifio, act_user: ansible, act_pass: mypassword }
vars:
act_vendorkey: "{{ contact CSE to get yours }}"
act_dest_host: "my-dev-server"
act_appname: "BEAST"
act_src_host: "beast-host"
act_job_class: "OnVault"
ora_home: "/u01/app/oracle/product/11.2.0/ora_1"
ora_db_name: "MYDEVBEAST"
SQL Server DB Application Example
- name: Single DB Application test
hosts: localhost
become: yes
become_method: sudo
roles:
- { role: ansible_appaware_mount, act_appliance: my-actifio, act_user: ansible, act_pass: mypassword }
vars:
act_vendorkey: "{{ contact CSE to get yours }}"
act_dest_host: "sql-dev-server"
act_appname: "DB00"
act_src_host: "sql-prd-server"
act_job_class: "snapshot"
act_imagelabel: "Test1"
sql_instance_name: "SQL-DEV-SERVER"
sql_db_name: "tDB00"
SQL Server Instance Application Example
- name: Instance with Multiple DBs test
hosts: localhost
become: yes
become_method: sudo
roles:
- { role: ansible_appaware_mount, act_appliance: my-actifio, act_user: ansible, act_pass: mypassword }
vars:
act_vendorkey: "{{ contact CSE to get yours }}"
act_dest_host: "sql-dev-server"
act_appname: "SQL-PRD-SERVER"
act_src_host: "sql-prd-server"
act_job_class: "snapshot"
act_imagelabel: "Test1"
sql_instance_name: "SQL-DEV-SERVER"
sql_source_dbnames: "DB01,DB02"
sql_dbname_prefix: "tst"
sql_cg_name: "TestCG1"
License
Copyright 2018 <Kosala Atapattu kosala.atapattu@actifio.com>
You can use this software for free, including using, copying, modifying, and distributing it, as long as you include the copyright notice.
Disclaimer: The software is provided "as is," with no warranties. The authors are not liable for any damages that may occur from using the software.
ansible-galaxy install Actifio.appaware_mount