This repository was archived by the owner on Mar 6, 2024. It is now read-only.
This repository was archived by the owner on Mar 6, 2024. It is now read-only.
Status code: 400/None when attempting any kind of operation #227
Open
Description
Describe the bug
Hello,
I'm trying out this module in order to automate EdgeGw operations in the future. From what I can see in the monitoring section, there are a few successful login/authorize attempts matching the timestamp of the playbook runs. Yet, no matter what service/operation I request, I get:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Status code: 400/None, None (request id: 954be739-a291-48da-8270-d945d707eb54)"}
Reproduction steps
pip3 install pyvcloud
- git clone https://github.com/vmware/ansible-module-vcloud-director
- My playbook looks like that:
- name: vCloudDirectorAnsible
hosts: localhost
tasks:
- name: Do Something
vcd_gateway_services:
host: "{{ VCD_URL }}" # Same as "Site"
user: "{{ VCD_USER }}"
password: "{{ VCD_PASSWORD }}" # Same user-credentials as I login into the GUI
org: "{{ VCD_ORG }}" Same as "Organisation"
vdc: "{{ VCD_ORG_VDC }}" Same as "Datacenter"
api_version: "34.0" # Also tried 33.0, which is also supported, same result
verify_ssl_certs: false
gateway: "edge-gateway"
service: "firewall"
operation: "list"
ansible-playbook -i localhost test.yml
Note that I also tried to create a new NAT-rule using this example, But the result is the same.
Expected behavior
A list of FW-rules, or a new NAT-rule when using the following pattern:
- name: create vCD edge gateway nat rule
vcd_gateway_services:
vdc: "{{ VCD_ORG_VDC }}"
gateway: "edge-gateway"
service: "nat_rule"
service_params:
- action: "snat"
original_address: "{{ internal_ip }}"
translated_address: "{{ external_ip }}"
state: "present"
Additional context
No response