When making a domain in ansible, ive been a playbook like this,
`
-
hosts: domaincontrollers[0]
tasks: -
name: make the domain
win_domain:
dns_domain_name: foo.local
safe_mode_password: A1!vagrant
register: check_domain -
name: Reboot to complete domain setup
win_reboot:
test_command: ‘exit (Get-Service -Name Netlogon).Status -ne “Running”’
post_reboot_delay: 600
when: check_domain.changed -
name: Make a domain admin
win_domain_user:
name: dom
upn: dom@foo.local
password: A1!vagrant
groups: -
Domain Admins
`
The example test command doesnt wait long enough and says the domain doesnt exist when i try to add a user. the console just says “applying settings” and it wont work till thats done. So what should i test for?