AFF

Ansible and Fpolicy management

Jechar
142 Views

Hello,

 

We try to configure Fpolicy throught Ansible to facilitate updates of exclude extension list content manage by security team.

In the extension list we have numeric extension like 000 but when ansible try to activate the fpolicy it failed :

"msg": "calling: /private/cli/vserver/fpolicy/policy/scope: got Expecting json, got: b'{
n \"records\": [
n

{\\n \"vserver\": \"BASNASCIFS\",\\n \"policy_name\": \"blockext_cifs_v1.50\",\\n \"file_extensions_to_include\": [\\n 000,\\n \"kkk\",\\n \"kkkjj\"\\n ],\\n \"is_file_extension_check_on_directories_enabled\": true,\\n \"is_monitoring_of_objects_with_no_extension_enabled\": false\\n }

n ],
n \"num_records\": 1
n}'."

 

For your information the scope is created successfully :

Vserver Policy Extensions Extensions
Name Name Included Excluded
----------------- ------------------- -------------------- -------------------
abcd  blockext_cifs_v1.50 000, kkk, kkkjj -

 


And if we enable the fpolicy throught the cli, it work ! 

 

Have you got an idea ?

It seems that ansible use the value as integer and not as string, we tried to add single au double quote, same issue

 

Thanks

Jc

0 REPLIES 0
Public