Make sure you prepared the environment using ansible_ppdm_agents
For this lab we use SQL01 and SQL01, wich are deployed in the Hosted Cluster. They are already Up and Running in from the vCloud Director in the VLAB. So we do not need to start them up front
ansible "windows:&databasehosts" -m win_ping -i hosts.yaml
Hint: As we only want to tackle the group named databasehosts, we use the –limit parameter
ansible-playbook ~/workspace/ansible_ppdm/120.0_ensure_mssql_aag_local_user.yaml \
-i hosts.yaml --limit 'windows:&databasehosts'
sudo apt install python3-pymssql -y
ansible-playbook ~/workspace/ansible_ppdm/100.3_playbook_copy_and_deploy_windows_agent.yaml -i hosts.yaml --limit 'windows:&databasehosts'
ansible-playbook ~/workspace/ansible_ppdm/100.3_playbook_copy_and_deploy_windows_agent.yaml -i hosts.yaml --limit 'windows:&databasehosts' -e "enable_ssms=1"
ansible-playbook ~/workspace/ansible_ppdm/100.5_get_agent_registration_status.yaml
Smetimes the AgentService, even deployed successfully, doesn´t register with the PPDM Host. This might be due to an delayed agent startup issue.
The following runbook will try to start the Agent:
ansible-playbook ~/workspace/ansible_ppdm/100.3_playbook_check_AgentService.yaml -i hosts.yaml --limit 'windows:&databasehosts'
We want to tackle the addresses of the host as they show up from above query, so we will use a runbook that resolves the agent list from name to address:
ansible-playbook ~/workspace/ansible_ppdm/100.4_create_whitelistentry_from_addressquery.yaml -e "host_list=SQL02.demo.local,SQL01.demo.local"
ansible-playbook ~/workspace/ansible_ppdm/100.5_get_agent_registration_status.yaml