Hei folks,
I am trying to enable VM firewall via API call using ansible URI module
but getting error:
Another similar api call for adding rules set
Tried with
Any idea?
Thx!
I am trying to enable VM firewall via API call using ansible URI module
Code:
- name: Enable firewall
ansible.builtin.uri:
url: "{{ proxmox_url }}:8006/api2/json/nodes/{{ node }}/qemu/{{ vmid }}/firewall/options"
method: POST
headers:
Authorization: "PVEAPIToken={{ api_user }}!{{ api_token_id }}={{ api_token_secret }}"
body_format: form-urlencoded
body:
- [ enable, true ]
but getting error:
Code:
"msg": "Status code was 501 and not [200]: HTTP Error 501: Method 'POST /nodes/node/qemu/111/firewall/options' not implemented"
Another similar api call for adding rules set
/firewall/rules
works just fine.Tried with
[ enable, 1 ]
as well, but no change.Any idea?
Thx!