I'm just getting more confused by this. I updated my Ansible version to run
from devel, this gave me some more info which I totally cannot make sense
of:
Here's the output running from devel:
TASK [deploy_azurevm : Add vm to inventory (Linux)] *********************
ERROR! the field 'hosts' has an invalid value, which appears to include a
variable that is undefined. The error was: 'resource_group_name' is
undefined
The error appears to have been in
'/opt/ansible/playbooks/config.azure/resourcegroupdeployments/TrondTest/site.yml':
line 9, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Configure VM
^ here
The weird thing here, is that the error references the _next_ play in my
playbook (that is, after the role has executed). Here's the whole playbook:
---
- name: Deploy Test VM
hosts: localhost
tags:
- deploy
roles:
- { role: deploy_azurevm, vm_name: "{{ resource_group_prefix
}}-trondtest", add_to_adhoc_group: "{{ resource_group_name }}" }
- name: Configure VM
hosts: "{{ resource_group_name }}"
roles:
- rikstv_basicconfig_azurevm
I don't know what's wrong, whether it's the logging or the execution but I
cannot make any sense of this.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/9cac3a2d-3cc9-4501-b7e7-ce7f189f1340%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.