The Winlogbeat running on DC depends on the Elasticsearch server. However, the creation time sequence of DC and Elasticsearch is uncontrollable. The error occurs when DC tries to fetch the Elasticsearch server's private IP before the Elasticsearch server finishes its creation. And it will raise the error shown below:
null_resource.provision_rest_of_dc_after_creation (local-exec): TASK [winlogbeat : Find Elasticsearch IP] **************************************
null_resource.provision_rest_of_dc_after_creation (local-exec): fatal: [domain-controller_2a61]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'elasticsearch'\n\nThe error appears to be in 'Adaz/ansible/roles/winlogbeat/tasks/main.yml': line 8, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Find Elasticsearch IP\n ^ here\n"}
In addition, the creation of the workstation also depends on DC. The user account must be already created on DC before starting the creation of the workstation. Otherwise, it will raise the error when doing the task "Ensure domain users can RDP on any workstation".
The Winlogbeat running on DC depends on the Elasticsearch server. However, the creation time sequence of DC and Elasticsearch is uncontrollable. The error occurs when DC tries to fetch the Elasticsearch server's private IP before the Elasticsearch server finishes its creation. And it will raise the error shown below:
In addition, the creation of the workstation also depends on DC. The user account must be already created on DC before starting the creation of the workstation. Otherwise, it will raise the error when doing the task "Ensure domain users can RDP on any workstation".