Skip to content

Commit b0145e5

Browse files
author
Kimmo Forss
committed
Script updates
1 parent e998951 commit b0145e5

File tree

2 files changed

+79
-6
lines changed

2 files changed

+79
-6
lines changed

articles/sap/automation/run-ansible.md

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ The following tasks are executed on Linux virtual machines:
235235
- Configures the banners displayed when signed in
236236
- Configures the services required
237237

238+
239+
You can either run the playbook using the DevOps Pipeline 'Configuration and SAP installation' choosing 'Core Operating System Configuration', or the configuration menu scipt 'configuration_menu.sh' or directly from the command line.
240+
241+
238242
```bash
239243

240244
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
@@ -252,7 +256,6 @@ playbook_options=(
252256

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

257260
# Run the playbook to perform the Operating System configuration
258261
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
@@ -276,6 +279,41 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
276279
- Configures Windows Firewall
277280
- Joins the virtual machine to the specified domain
278281

282+
283+
You can either run the playbook using the DevOps Pipeline 'Configuration and SAP installation' choosing 'Core Operating System Configuration', or the configuration menu scipt 'configuration_menu.sh' or directly from the command line.
284+
285+
286+
```bash
287+
288+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
289+
290+
export sap_sid=L00
291+
export workload_vault_name="LABSECESAP04user###"
292+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
293+
prefix="LAB-SECE-SAP04"
294+
295+
password_secret_name=$prefix-sid-password
296+
297+
password_secret=$(az keyvault secret show --vault-name ${workload_vault_name} --name ${password_secret_name} --query value --output table)
298+
export ANSIBLE_PASSWORD=$password_secret
299+
300+
playbook_options=(
301+
--inventory-file="${sap_sid}_hosts.yaml"
302+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
303+
--extra-vars="_workspace_directory=`pwd`"
304+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
305+
--extra-vars="@sap-parameters.yaml"
306+
"${@}"
307+
)
308+
309+
# Run the playbook to retrieve the ssh key from the Azure key vault
310+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
311+
312+
# Run the playbook to perform the Operating System configuration
313+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
314+
315+
```
316+
279317
---
280318

281319
### SAP-specific operating system configuration
@@ -293,24 +331,27 @@ The following tasks are executed on Linux virtual machines:
293331
- Configures the SAP-specific services
294332
- Implements configurations defined in the relevant SAP Notes
295333

334+
You can either run the playbook using the DevOps Pipeline 'Configuration and SAP installation' choosing 'SAP Operating System Configuration', or the configuration menu scipt 'configuration_menu.sh' or directly from the command line.
335+
336+
296337
```bash
297338

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

300-
export sap_sid=L00
301-
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
341+
export sap_sid=L00
342+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
302343

303344
playbook_options=(
304345
--inventory-file="${sap_sid}_hosts.yaml"
305346
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
306347
--extra-vars="_workspace_directory=`pwd`"
348+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
307349
--extra-vars="@sap-parameters.yaml"
308350
"${@}"
309351
)
310352

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

315356
# Run the playbook to perform the SAP Specific Operating System configuration
316357
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml
@@ -322,6 +363,40 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
322363
- Adds local groups and permissions
323364
- Connects to the Windows file shares
324365

366+
You can either run the playbook using the DevOps Pipeline 'Configuration and SAP installation' choosing 'SAP Operating System Configuration', or the configuration menu scipt 'configuration_menu.sh' or directly from the command line.
367+
368+
369+
```bash
370+
371+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
372+
373+
export sap_sid=L00
374+
export workload_vault_name="LABSECESAP04user###"
375+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
376+
prefix="LAB-SECE-SAP04"
377+
378+
password_secret_name=$prefix-sid-password
379+
380+
password_secret=$(az keyvault secret show --vault-name ${workload_vault_name} --name ${password_secret_name} --query value --output table)
381+
export ANSIBLE_PASSWORD=$password_secret
382+
383+
playbook_options=(
384+
--inventory-file="${sap_sid}_hosts.yaml"
385+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
386+
--extra-vars="_workspace_directory=`pwd`"
387+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
388+
--extra-vars="@sap-parameters.yaml"
389+
"${@}"
390+
)
391+
392+
# Run the playbook to retrieve the ssh key from the Azure key vault
393+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
394+
395+
# Run the playbook to perform the Operating System configuration
396+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml
397+
398+
```
399+
325400
---
326401

327402
### Local software download

articles/sap/automation/tutorial.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,6 @@ playbook_options=(
957957
958958
# Run the playbook to retrieve the ssh key from the Azure key vault
959959
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
960-
```
961960
962961
# Run the playbook to perform the Operating System configuration
963962
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
@@ -988,7 +987,6 @@ playbook_options=(
988987
989988
# Run the playbook to retrieve the ssh key from the Azure key vault
990989
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
991-
```
992990
993991
# Run the playbook to perform the SAP Specific Operating System configuration
994992
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml

0 commit comments

Comments
 (0)