Azure-Samples / ansible-playbooks

Ansible Playbook Samples for Azure
MIT License
229 stars 349 forks source link

Ansible playbook error vm_create_windows.yml #78

Closed dennopro closed 4 years ago

dennopro commented 4 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

edited playbook with resource group name as Ansible then run playbook vm_create_windows.yml in ansible

Any log messages given by the failure

TASK [create Azure virtual network in resource group] ** fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'Ansible' is undefined\n\nThe error appears to be in '/var/lib/awx/projects/_14__azure_infrastructure_test/vm_create_windows.yml': line 33, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: create Azure virtual network in resource group\n ^ here\n"}

Expected/desired behavior

success creation of virtual network

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) ansible is on linux, linked azure to ansible and was to create a windows server 2016 in azure

Versions

Ansible 2.8

Mention any other details that might be useful

adding existing resource group fails, creating new resource group also fails

Thanks! We'll be in touch soon.

Fred-sun commented 4 years ago

@dennopro Thank you for taking the time to report this problem! It is known from your error message that an unknown variable caused the error. Can you provide your playbook for me to try? Thank you very much!

dennopro commented 4 years ago

Hello Fred,

I managed to fix this by renaming the resource group declared variable in the playbook form "{{resource_group}}"" to "resource_group" this was in the play book vm_create_windows.yml and this worked out well, thanx for the followup

regards

Andrew

On Thu, Dec 5, 2019 at 3:38 AM Fred-sun notifications@github.com wrote:

@dennopro https://github.com/dennopro Thank you for taking the time to report this problem! It is known from your error message that an unknown variable caused the error. Can you provide your playbook for me to try? Thank you very much!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/ansible-playbooks/issues/78?email_source=notifications&email_token=AB6TESB2MOWCBMBBF4XYS4LQXBSQ3A5CNFSM4JUUXSE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF7IPFQ#issuecomment-561940374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6TESCUIZ73N2HZQMAALLDQXBSQ3ANCNFSM4JUUXSEQ .

Fred-sun commented 4 years ago

@dennopro Ok, thank you for your reply. If there is no other problem, can this problem be closed?

dennopro commented 4 years ago

This can be closed

Regards

Andrew

On Fri, Dec 6, 2019, 03:03 Fred-sun notifications@github.com wrote:

@dennopro https://github.com/dennopro Ok, thank you for your reply. If there is no other problem, can this problem be closed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/ansible-playbooks/issues/78?email_source=notifications&email_token=AB6TESBMZVXN4VU4YL25ZZ3QXGXHZA5CNFSM4JUUXSE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCYXFQ#issuecomment-562400150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6TESE2OJ3AYNDHKIBYJO3QXGXHZANCNFSM4JUUXSEQ .

Fred-sun commented 4 years ago

close_me

Fred-sun commented 4 years ago

ping to close

dennopro commented 4 years ago

thanx for the ping fred, sorry been away for a while