ansible-collection-hetzner-.../plugins/modules
Julian Tölle 9b471cbb00
fix(server): TypeError when using deprecated image (#219)
When using a deprecated image with the "allow_deprecated_image" flag,
the script would crash because the string interpolation was not done
correctly. The brackes were in the wrong place.

Error would look like this:

   An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
   fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/home/julian/.ansible/tmp/ansible-tmp-1686564668.6136558-165294-192879183382787/AnsiballZ_hcloud_server.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/julian/.ansible/tmp/ansible-tmp-1686564668.6136558-165294-192879183382787/AnsiballZ_hcloud_server.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/julian/.ansible/tmp/ansible-tmp-1686564668.6136558-165294-192879183382787/AnsiballZ_hcloud_server.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.hetzner.hcloud.plugins.modules.hcloud_server', init_globals=dict(_module_fqn='ansible_collections.hetzner.hcloud.plugins.modules.hcloud_server', _modlib_path=modlib_path),\n  File \"/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/lib/python3.10/runpy.py\", line 224, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/run/user/1000/ansible_hcloud_server_payload_1g2rf66q/ansible_hcloud_server_payload.zip/ansible_collections/hetzner/hcloud/plugins/modules/hcloud_server.py\", line 927, in <module>\n  File \"/run/user/1000/ansible_hcloud_server_payload_1g2rf66q/ansible_hcloud_server_payload.zip/ansible_collections/hetzner/hcloud/plugins/modules/hcloud_server.py\", line 908, in main\n  File \"/run/user/1000/ansible_hcloud_server_payload_1g2rf66q/ansible_hcloud_server_payload.zip/ansible_collections/hetzner/hcloud/plugins/modules/hcloud_server.py\", line 843, in present_server\n  File \"/run/user/1000/ansible_hcloud_server_payload_1g2rf66q/ansible_hcloud_server_payload.zip/ansible_collections/hetzner/hcloud/plugins/modules/hcloud_server.py\", line 411, in _create_server\n  File \"/run/user/1000/ansible_hcloud_server_payload_1g2rf66q/ansible_hcloud_server_payload.zip/ansible_collections/hetzner/hcloud/plugins/modules/hcloud_server.py\", line 518, in _get_image\nTypeError: unsupported operand type(s) for %: 'NoneType' and 'str'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
2023-06-19 15:17:07 +02:00
..
__init__.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_certificate.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_certificate_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_datacenter_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_datacenter_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_firewall.py hcloud_firewall: Fix race condition on deletion of firewalls (#166) 2022-11-08 14:05:13 +01:00
hcloud_floating_ip.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_floating_ip_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_floating_ip_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_image_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_image_info.py docs: show warning if image_info is used without architecture (#215) 2023-05-16 11:29:53 +02:00
hcloud_load_balancer.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_load_balancer_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_load_balancer_network.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_load_balancer_service.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_load_balancer_target.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_load_balancer_type_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_location_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_location_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_network.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_network_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_placement_group.py Docs: fix typo (#127) 2022-04-25 06:28:21 +02:00
hcloud_primary_ip.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_rdns.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_route.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_server.py fix(server): TypeError when using deprecated image (#219) 2023-06-19 15:17:07 +02:00
hcloud_server_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_server_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_server_network.py fixes alias_ips by using sorted (#134) 2022-06-13 08:58:32 +02:00
hcloud_server_type_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_server_type_info.py feat(server_type): return included traffic (#212) 2023-05-15 09:40:19 +02:00
hcloud_ssh_key.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_ssh_key_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_ssh_key_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_subnetwork.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_volume.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00
hcloud_volume_facts.py Initial commit 2020-03-09 13:36:01 +00:00
hcloud_volume_info.py lint: fix unused-import errors (#195) 2023-03-31 09:01:22 +02:00