Ansible 構成の概要

SAP デプロイ自動化フレームワークを使用すると、インフラストラクチャの自動デプロイを実行できます。 また、リポジトリに用意されている Ansible プレイブックを使用して、必要なオペレーティング システムの構成を行い、SAP をインストールすることもできます。 これらのプレイブックは、/sap-automation/deploy/ansible フォルダー内のオートメーション フレームワーク リポジトリにあります。

ファイル名 説明
playbook_01_os_base_config.yaml ベース オペレーティング システムの構成
playbook_02_os_sap_specific_config.yaml SAP 固有のオペレーティング システムの構成
playbook_03_bom_processing.yaml SAP 部品表の処理
playbook_04_00_00_hana_db_install SAP HANA データベースのインストール
playbook_05_00_00_sap_scs_install.yaml SAP セントラル サービスのインストール
playbook_05_01_sap_dbload.yaml データベース ローダー
playbook_04_00_01_hana_hsr.yaml SAP HANA の高可用性構成
playbook_05_02_sap_pas_install.yaml SAP プライマリ アプリケーション サーバーのインストール
playbook_05_03_sap_app_install.yaml SAP アプリケーション サーバー のインストール
playbook_05_04_sap_web_install.yaml SAP Web Dispatcher のインストール

前提条件

Ansible プレイブックでは、現在のディレクトリに sap-parameters.yaml ファイルと SID_host.yaml ファイルが必要です。

構成ファイル

sap-parameters.yaml ファイルには、Ansible が SAP インフラストラクチャの構成に使用する情報が含まれています。

---

# bom_base_name is the name of the SAP Application Bill of Materials file
bom_base_name:                 S41909SPS03_v0010ms
# Set to true to instruct Ansible to update all the packages on the virtual machines
upgrade_packages:              false 

# TERRAFORM CREATED
sap_fqdn:                      sap.contoso.net                      
# kv_name is the name of the key vault containing the system credentials
kv_name:                       LABSECESAP01user###
# secret_prefix is the prefix for the name of the secret stored in key vault
secret_prefix:                 LAB-SECE-SAP01

# sap_sid is the application SID
sap_sid:                       L00
# scs_high_availability is a boolean flag indicating 
# if the SAP Central Services are deployed using high availability 
scs_high_availability:         false
# SCS Instance Number
scs_instance_number:           "00"
# scs_lb_ip is the SCS IP address of the load balancer in 
# front of the SAP Central Services virtual machines
scs_lb_ip:                     10.110.32.26
# ERS Instance Number
ers_instance_number:           "02"
# ecs_lb_ip is the ERS IP address of the load balancer in
# front of the SAP Central Services virtual machines
ers_lb_ip:                     

# sap_sid is the database SID
db_sid:                        XDB
# platform
platform:                      HANA

# db_high_availability is a boolean flag indicating if the 
# SAP database servers are deployed using high availability
db_high_availability:          false
# db_lb_ip is the IP address of the load balancer in front of the database virtual machines
db_lb_ip:                      10.110.96.13

disks:
  - { host: 'l00dxdb00l0538', LUN: 0, type: 'sap' }
  - { host: 'l00dxdb00l0538', LUN: 10, type: 'data' }
  - { host: 'l00dxdb00l0538', LUN: 11, type: 'data' }
  - { host: 'l00dxdb00l0538', LUN: 12, type: 'data' }
  - { host: 'l00dxdb00l0538', LUN: 13, type: 'data' }
  - { host: 'l00dxdb00l0538', LUN: 20, type: 'log' }
  - { host: 'l00dxdb00l0538', LUN: 21, type: 'log' }
  - { host: 'l00dxdb00l0538', LUN: 22, type: 'log' }
  - { host: 'l00dxdb00l0538', LUN: 2, type: 'backup' }
  - { host: 'l00app00l538', LUN: 0, type: 'sap' }
  - { host: 'l00app01l538', LUN: 0, type: 'sap' }
  - { host: 'l00scs00l538', LUN: 0, type: 'sap' }

...

L00_hosts.yaml ファイルは、Ansible が SAP インフラストラクチャの構成に使用するインベントリ ファイルです。 L00 ラベルは、デプロイによって異なる場合があります。

L00_DB:
  hosts:
    l00dxdb00l0538:
      ansible_host        : 10.110.96.12
      ansible_user        : azureadm
      ansible_connection  : ssh 
      connection_type     : key
  vars:
    node_tier             : hana

L00_SCS:
  hosts:
    l00scs00l538:
      ansible_host        : 10.110.32.25
      ansible_user        : azureadm
      ansible_connection  : ssh 
      connection_type     : key
  vars:
    node_tier             : scs

L00_ERS:
  hosts:
  vars:
    node_tier             : ers

L00_PAS:
  hosts:
    l00app00l538:
      ansible_host        : 10.110.32.24
      ansible_user        : azureadm
      ansible_connection  : ssh 
      connection_type     : key 

  vars:
    node_tier             : pas

L00_APP:
  hosts:
    l00app01l538:
      ansible_host        : 10.110.32.15
      ansible_user        : azureadm
      ansible_connection  : ssh 
      connection_type     : key 

  vars:
    node_tier             : app

L00_WEB:
  hosts:
  vars:
    node_tier             : web

プレイブックを実行する

この手順を実行する前に、必ず Azure 環境に SAP ソフトウェアをダウンロードしてください。

プレイブックを実行する方法の 1 つは、構成メニューを使用することです。

configuration_menu スクリプトを実行します。

${HOME}/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/configuration_menu.sh

Diagram that shows the SAP Deployment Automation Ansible configuration menu.

1 つまたは複数のプレイブックを実行するには、次の ansible-playbook コマンドを使用します。 この例では、オペレーティング システム構成プレイブックを実行します。


sap_params_file=sap-parameters.yaml

if [[ ! -e "${sap_params_file}" ]]; then
        echo "Error: '${sap_params_file}' file not found!"
        exit 1
fi

# Extract the sap_sid from the sap_params_file, so that we can determine
# the inventory file name to use.
sap_sid="$(awk '$1 == "sap_sid:" {print $2}' ${sap_params_file})"

kv_name="$(awk '$1 == "kv_name:" {print $2}' ${sap_params_file})"

prefix="$(awk '$1 == "secret_prefix:" {print $2}' ${sap_params_file})"
password_secret_name=$prefix-sid-password

password_secret=$(az keyvault secret show --vault-name ${kv_name} --name ${password_secret_name} --query value --output table )

export           ANSIBLE_PASSWORD=$password_secret
export           ANSIBLE_INVENTORY="${sap_sid}_hosts.yaml"
export           ANSIBLE_PRIVATE_KEY_FILE=sshkey
export           ANSIBLE_COLLECTIONS_PATHS=/opt/ansible/collections${ANSIBLE_COLLECTIONS_PATHS:+${ANSIBLE_COLLECTIONS_PATHS}}
export           ANSIBLE_REMOTE_USER=azureadm

export           ANSIBLE_PYTHON_INTERPRETER=auto_silent

# Set of options that will be passed to the ansible-playbook command
playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars="@${sap_params_file}"
        -e ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        "${@}"
)

ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml


オペレーティング システムの構成

オペレーティング システム構成プレイブックは、SAP 仮想マシンのオペレーティング システムを構成するために使用されます。 プレイブックは、次のタスクを実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationCore Operating System Configuration を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

次のタスクは Linux 仮想マシンで実行されます。

  • sudo 操作のログ記録を有効にします。
  • Azure 仮想マシン エージェントが正しく構成されていることを確認します。
  • すべてのリポジトリが登録され、有効になっていることを確認します。
  • すべてのパッケージがインストールされていることを確認します。
  • ボリューム グループと論理ボリュームを作成します。
  • カーネル パラメーターを構成します。
  • より多くのネットワーク インターフェイスのルーティングを構成します (必要な場合)。
  • ユーザー アカウントとグループを作成します。
  • サインイン時に表示されるバナーを構成します。
  • 必要なサービスを構成します。

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                            sap_sid=L00
export           ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to perform the Operating System configuration
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml

SAP 固有のオペレーティング システムの構成

SAP 固有のオペレーティング システム構成プレイブックは、SAP 仮想マシンのオペレーティング システムを構成するために使用されます。 プレイブックは、次のタスクを実行します。

次のタスクは Linux 仮想マシンで実行されます。

  • hosts ファイルを構成する。
  • すべての SAP 固有のリポジトリが登録され、有効になっていることを確認します。
  • すべての SAP 固有のパッケージがインストールされていることを確認します。
  • ディスク マウント操作を実行します。
  • SAP 固有のサービスを構成します。
  • 関連する SAP ノートで定義されている構成を実装します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationSAP Operating System Configuration を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to perform the SAP Specific Operating System configuration
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml

ローカル ソフトウェアのダウンロード

このプレイブックでは、コントロール プレーンからインストール メディア ソースにインストール メディアをダウンロードします。 インストール メディアは、セントラル サービス インスタンスから、あるいは Azure Files または Azure NetApp Files から共有できます。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationLocal software download を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

次のタスクはセントラル サービス インスタンスの仮想マシンで実行されます。

  • ストレージ アカウントからソフトウェアをダウンロードして、他の仮想マシンで使用できるようにします。

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_03_bom_processing.yaml

SAP セントラル サービスと高可用性構成

このプレイブックは、セントラル サービスのインストールを実行します。 高可用性シナリオの場合、プレイブックは、Linux および Windows で高可用性を実現するために SAP セントラル サービスが必要とする Pacemaker クラスターと Windows 向けの Windows フェイルオーバー クラスタリングも構成します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationSCS Installation & High Availability Configuration を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • セントラル サービスのインストール
  • Pacemaker クラスターの構成

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_00_00_sap_scs_install.yaml

データベースのインストール

このプレイブックは、データベース サーバーのインストールを実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationDatabase installation を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • データベース インスタンスのインストール

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_04_00_00_db_install.yaml

データベースの読み込み

このプレイブックは、データベースの読み込みを実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationDatabase Load を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • データベースの読み込み

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_01_sap_dbload.yaml

データベースの高可用性構成

このプレイブックは、データベース サーバーの高可用性構成を実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationDatabase High Availability Configuration を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • データベースの高可用性構成。
  • HANA の場合、プレイブックは、Linux で高可用性を実現するために SAP HANA が必要とする Pacemaker クラスターと HANA システム レプリケーションも構成します。
  • Oracle の場合、プレイブックは Oracle Data Guard も構成します。

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_04_00_01_db_ha.yaml

プライマリ アプリケーション サーバーのインストール

このプレイブックは、プライマリ アプリケーション サーバーのインストールを実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationPrimary Application Server Installation を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • プライマリ アプリケーション サーバーのインストール

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_02_sap_pas_install.yaml

追加のアプリケーション サーバーのインストール

このプレイブックは、アプリケーション サーバーのインストールを実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationApplication Server Installation を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • アプリケーション サーバーのインストール

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_02_sap_app_install.yaml

Web Dispatcher のインストール

このプレイブックは、Web Dispatcher のインストールを実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationWeb Dispatcher Installation を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • Web Dispatcher のインストール

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_04_sap_web_install.yaml

ACSS 登録

このプレイブックは、Azure Center for SAP Solutions (ACSS) の登録を実行します。

プレイブックは、次のいずれかを使用して実行できます。

  • DevOps パイプラインの Configuration and SAP installationRegister System in ACSS を選択します。
  • configuration_menu スクリプト configuration_menu.sh
  • コマンド ライン。

プレイブックは、次のタスクを実行します。

  • ACSS 登録

cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/

export                   sap_sid=L00
export  ANSIBLE_PRIVATE_KEY_FILE=sshkey

playbook_options=(
        --inventory-file="${sap_sid}_hosts.yaml"
        --private-key=${ANSIBLE_PRIVATE_KEY_FILE}
        --extra-vars="_workspace_directory=`pwd`"
        --extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
        --extra-vars="@sap-parameters.yaml"
        "${@}"
)

# Run the playbook to retrieve the ssh key from the Azure key vault
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml

# Run the playbook to download the software from the SAP Library
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_06_00_acss_registration.yaml