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
- Install ansible locally, in cloud shell, or using the Ansible VM
- Verify ansible is running correctly by creating a resource group, etc.
- download the webapp.yml from the repo and run with ansible-playbook webapp.yml
FIRST ERROR
Variable 'resource_group_name' is not defined--> fixed (this is a bug)
SECOND ERROR
- Define resource_group_name: "ansible-test-rg"
- Fails at step "TASK [Create App Service on Linux with Java Runtime] "
Any log messages given by the failure
WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[DEPRECATION WARNING]: azure_rm_webapp_facts is kept for backwards compatibility but usage is discouraged. The module documentation details page may
explain more about this rationale.. This feature will be removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: azure_rm_trafficmanagerprofile_facts is kept for backwards compatibility but usage is discouraged. The module documentation
details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation warnings can be disabled by
setting deprecation_warnings=False in ansible.cfg.
PLAY [localhost] ************************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************************
ok: [localhost]
TASK [Create resource group] ************************************************************************************************************************
changed: [localhost]
TASK [Create resource group for app service plan] ***************************************************************************************************
changed: [localhost]
TASK [Create App Service Plan] **********************************************************************************************************************
[WARNING]: The value 1 (type int) in a string field was converted to '1' (type string). If this does not look like what you expect, quote the entire
value to ensure it does not change.
changed: [localhost]
TASK [Create a Linux web app with Java framework and Tomcat] ****************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: azure.mgmt.web.models.default_error_response_py3.DefaultErrorResponseException: Operation returned an invalid status code 'Conflict'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/Users/robcamer/.ansible/tmp/ansible-tmp-1583114293.997421-20084909233583/AnsiballZ_azure_rm_webapp.py", line 102, in \n _ansiballz_main()\n File "/Users/robcamer/.ansible/tmp/ansible-tmp-1583114293.997421-20084909233583/AnsiballZ_azure_rm_webapp.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/Users/robcamer/.ansible/tmp/ansible-tmp-1583114293.997421-20084909233583/AnsiballZ_azure_rm_webapp.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.cloud.azure.azure_rm_webapp', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/var/folders/7q/f0fk9fl96zs84r2qhy3xtybm0000gn/T/ansible_azure_rm_webapp_payload_08qtfwsh/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 1070, in \n File "/var/folders/7q/f0fk9fl96zs84r2qhy3xtybm0000gn/T/ansible_azure_rm_webapp_payload_08qtfwsh/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 1066, in main\n File "/var/folders/7q/f0fk9fl96zs84r2qhy3xtybm0000gn/T/ansible_azure_rm_webapp_payload_08qtfwsh/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 548, in init\n File "/var/folders/7q/f0fk9fl96zs84r2qhy3xtybm0000gn/T/ansible_azure_rm_webapp_payload_08qtfwsh/ansible_azure_rm_webapp_payload.zip/ansible/module_utils/azure_rm_common.py", line 348, in init\n File "/var/folders/7q/f0fk9fl96zs84r2qhy3xtybm0000gn/T/ansible_azure_rm_webapp_payload_08qtfwsh/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 762, in exec_module\n File "/var/folders/7q/f0fk9fl96zs84r2qhy3xtybm0000gn/T/ansible_azure_rm_webapp_payload_08qtfwsh/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 851, in create_update_webapp\n File "/usr/local/lib/python3.7/site-packages/azure/mgmt/web/operations/web_apps_operations.py", line 332, in create_or_update\n **operation_config\n File "/usr/local/lib/python3.7/site-packages/azure/mgmt/web/operations/web_apps_operations.py", line 280, in _create_or_update_initial\n raise models.DefaultErrorResponseException(self._deserialize, response)\nazure.mgmt.web.models.default_error_response_py3.DefaultErrorResponseException: Operation returned an invalid status code 'Conflict'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP ******************************************************************************************************************************************
localhost : ok=4 changed=3 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Expected/desired behavior
All tasks complete.
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
macOs - Catalina, cloud shell, and Ansible VM in Azure Marketplace
Versions
ansible 2.9.5 "latest"
Mention any other details that might be useful
Here's the run in cloudshell:
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[DEPRECATION WARNING]: azure_rm_webapp_facts is kept for backwards compatibility but usage is discouraged. The module documentation
details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: azure_rm_trafficmanagerprofile_facts is kept for backwards compatibility but usage is discouraged. The module
documentation details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [localhost] *********************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************
ok: [localhost]
TASK [Create resource group] *********************************************************************************************************
ok: [localhost]
TASK [Create resource group for app service plan] ************************************************************************************
ok: [localhost]
TASK [Create App Service Plan] *******************************************************************************************************
[WARNING]: The value 1 (type int) in a string field was converted to u'1' (type string). If this does not look like what you expect,
quote the entire value to ensure it does not change.
ok: [localhost]
TASK [Create a Linux web app with Java framework and Tomcat] *************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: azure.mgmt.web.models.default_error_response.DefaultErrorResponseException: Operation returned an invalid status code 'Conflict'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/rob/.ansible/tmp/ansible-tmp-1583115073.05-62974939462357/AnsiballZ_azure_rm_webapp.py", line 102, in \n _ansiballz_main()\n File "/home/rob/.ansible/tmp/ansible-tmp-1583115073.05-62974939462357/AnsiballZ_azure_rm_webapp.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/rob/.ansible/tmp/ansible-tmp-1583115073.05-62974939462357/AnsiballZ_azure_rm_webapp.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.cloud.azure.azure_rm_webapp', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib/python2.7/runpy.py", line 188, in run_module\n fname, loader, pkg_name)\n File "/usr/lib/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/usr/lib/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_azure_rm_webapp_payload_jpoQtw/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 1070, in \n File "/tmp/ansible_azure_rm_webapp_payload_jpoQtw/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 1066, in main\n File "/tmp/ansible_azure_rm_webapp_payload_jpoQtw/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 548, in init\n File "/tmp/ansible_azure_rm_webapp_payload_jpoQtw/ansible_azure_rm_webapp_payload.zip/ansible/module_utils/azure_rm_common.py", line 348, in init\n File "/tmp/ansible_azure_rm_webapp_payload_jpoQtw/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 762, in exec_module\n File "/tmp/ansible_azure_rm_webapp_payload_jpoQtw/ansible_azure_rm_webapp_payload.zip/ansible/modules/cloud/azure/azure_rm_webapp.py", line 851, in create_update_webapp\n File "/opt/ansible/lib/python2.7/site-packages/azure/mgmt/web/operations/web_apps_operations.py", line 332, in create_or_update\n **operation_config\n File "/opt/ansible/lib/python2.7/site-packages/azure/mgmt/web/operations/web_apps_operations.py", line 280, in _create_or_update_initial\n raise models.DefaultErrorResponseException(self._deserialize, response)\nazure.mgmt.web.models.default_error_response.DefaultErrorResponseException: Operation returned an invalid status code 'Conflict'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP ***************************************************************************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Thanks! We'll be in touch soon.