Make sure you prepared the environment using ansible_ppdm_agents
Make sure the “File VM” is started
ansible-playbook ../playbooks/start_stop_vms_by_vm_names.yaml -e vm_names='file' -e state=start
it will take a while for the VM to be running. Check it is reachable using win_ping
ansible filehosts -m win_ping -i hosts.yaml
once we receive a “pong” the machines are up and reachable for ansible communication´s
Some hosts might have manually altered hosts files. We do not want this as we use DNS for Agents in the Scenario. The Following Playbook will clear hosts for the scope og filehosts ( launchpad and file.demo.local )
ansible-playbook ~/workspace/ansible_ppdm/100.3_playbook_clear_hosts_windows_agent.yaml -i hosts.yaml --limit filehosts,
The example will use the Inventory from the previously create file “hosts.yaml”.
As we only want to tackle the hostgroup named filehosts, we use the –limit parameter
the host list for parameter –limit must end with a comma
ansible-playbook ~/workspace/ansible_ppdm/100.3_playbook_copy_and_deploy_windows_agent.yaml -i hosts.yaml --limit filehosts,
ansible-playbook ~/workspace/ansible_ppdm/100.5_get_agent_registration_status.yaml
The Agent will also be visbile as “Waiting Approval” in the UI
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 filehosts,
as we could see from the Agent registration Status, the Agent´s address is the primary IP Address. We need to Approve the Host with a whitelist using the primary IP Address.
ansible-playbook ~/workspace/ansible_ppdm/100.4_create_whitelistentry.yaml -e "host_list=192.168.1.107,192.168.1.2"
the agent status should transfer to Approving Certificates
And finally to registered:
ansible-playbook ~/workspace/ansible_ppdm/100.5_get_agent_registration_status.yaml