We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We are trying to do PITR recovery of Azure SQL database but we are not able to format restore_point_in_time argument. We tried:
restore_point_in_time: "2021-08-26 11:35:00" restore_point_in_time: "{{ '2021-08-26 11:35:00' | to_datetime }}" restore_point_in_time: "{{ ('2021-08-26 11:35:00' | to_datetime).isoformat() }}"
None of this were working
azure.azcollection.azure_rm_sqldatabase
ansible [core 2.11.4] config file = None configured module search path = ['/home/wohnout/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible ansible collection location = /home/wohnout/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] jinja version = 2.10.1 libyaml = True
# /home/wohnout/.ansible/collections/ansible_collections Collection Version ------------------ ------- azure.azcollection 1.8.0
Empty
Called from ubuntu 20.04 to Azure
- name: Creating PITR database azure_rm_sqldatabase: resource_group: "{{ azure_resource_group }}" create_mode: point_in_time_restore restore_point_in_time: "{{ ('2021-08-27 05:35:00' | to_datetime).isoformat() }}" source_database_id: "/subscriptions/{{ azure_subscription }}/resourceGroups/{{ azure_resource_group }}/providers/Microsoft.Sql/servers/{{ db_name }}/databases/test" server_name: "{{ db_name }}" name: test_PITR location: "{{ azure_resource_region }}"
task correctly processe
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: wohnout <127.0.0.1> EXEC /bin/sh -c 'echo ~wohnout && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/wohnout/.ansible/tmp `"&& mkdir "` echo /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864 `" && echo ansible-tmp-1630051202.1023154-395-137801296321864="` echo /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864 `" ) && sleep 0' redirecting (type: modules) ansible.builtin.azure_rm_sqldatabase to azure.azcollection.azure_rm_sqldatabase Using module file /home/wohnout/.ansible/collections/ansible_collections/azure/azcollection/plugins/modules/azure_rm_sqldatabase.py <127.0.0.1> PUT /home/wohnout/.ansible/tmp/ansible-local-3902bclxy18/tmppdnf0zrx TO /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864/AnsiballZ_azure_rm_sqldatabase.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864/ /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864/AnsiballZ_azure_rm_sqldatabase.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864/AnsiballZ_azure_rm_sqldatabase.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/wohnout/.ansible/tmp/ansible-tmp-1630051202.1023154-395-137801296321864/ > /dev/null 2>&1 && sleep 0' fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "ad_user": null, "adfs_authority_url": null, "api_profile": "latest", "append_tags": true, "auth_source": "auto", "cert_validation_mode": null, "client_id": null, "cloud_environment": "AzureCloud", "collation": null, "create_mode": "point_in_time_restore", "edition": null, "elastic_pool_name": null, "force_update": null, "location": "northeurope", "log_mode": null, "log_path": null, "max_size_bytes": null, "name": "test_PITR", "password": null, "profile": null, "read_scale": false, "recovery_services_recovery_point_resource_id": null, "resource_group": "resource-group", "restore_point_in_time": "2021-08-26T11:35:00", "sample_name": null, "secret": null, "server_name": "db-server-name", "sku": null, "source_database_deletion_date": null, "source_database_id": "/subscriptions/azure-subscription/resourceGroups/resource-group/providers/Microsoft.Sql/servers/db-server-name/databases/test", "state": "present", "subscription_id": null, "tags": null, "tenant": null, "zone_redundant": false } }, "msg": "argument 'restore_point_in_time' is of type <class 'str'> and we were unable to convert to datetime: 'NoneType' object is not callable" }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
SUMMARY
We are trying to do PITR recovery of Azure SQL database but we are not able to format restore_point_in_time argument. We tried:
restore_point_in_time: "2021-08-26 11:35:00"
restore_point_in_time: "{{ '2021-08-26 11:35:00' | to_datetime }}"
restore_point_in_time: "{{ ('2021-08-26 11:35:00' | to_datetime).isoformat() }}"
None of this were working
ISSUE TYPE
COMPONENT NAME
azure.azcollection.azure_rm_sqldatabase
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Called from ubuntu 20.04 to Azure
STEPS TO REPRODUCE
EXPECTED RESULTS
task correctly processe
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: