This message was deleted.
# neuvector-security
a
This message was deleted.
n
fixed it, the problem is that a GET to
Copy code
<api url>/v2/system/config
Wil give you output in v1 format. I loaded the api docs in swagger, see link https://raw.githubusercontent.com/neuvector/neuvector/main/controller/api/apis.yaml You will need to look at the model, this is the correct call
Copy code
- name: Disable Network Policy Enforcement
      ansible.builtin.uri:
        url: "{{ nv_url }}/v2/system/config"
        method: PATCH
        headers:
          {
            "X-Auth-Token": "{{ nv_token }}",
            "accept": "application/json",
            "Content-Type": "application/json"
          }
        body_format: json
        body: {
          "net_config": {
            "disable_net_policy": true
          }
        }
        status_code: 200
        validate_certs: "{{ nv_ca_verify }}"
q
Good catch!
Curious: Why did you choose to disable network policy enforcement?
n
We have other tools like kyverno to create networkpolicies by default on the namespaces.
Also the feedback we got from our powerusers is that exporting en importing policies gives to much issues.