Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
oakint
Explorer

Ansible : How to increase response from Verify-Policy command

I am currently developing ansible for adding rule into checkpoint security management server. According to my company policy, the rule needs to be verified first and it will be implemented later at the scheduled time. However, when "verify-policy" command, following is the response i got. 

management server : R80.20
api_version: 1.3

(with -vvvv optiong) 

fatal: [test1]: FAILED! => {

    "changed": false,

    "invocation": {

        "module_args": {

            "api_version": null,

            "command": "verify-policy",

            "context": null,

            "fingerprint": null,

            "parameters": "{'policy-package': 'standard'}",

            "session-data": "{'failed': False, 'changed': False, 'response': {'domain': None, 'url': '192.168.56.80:443', 'sid': 'KDnWv33ZQl6z-5ZAlb0kwjZLzZpqD2e3YL-D23sL4jk', 'context': 'web_api', 'fingerprint': '83F58C9B4FE00C1B12456A11AEA756E6A575B205', 'api_version': '1.3'}}"

        }

    },

    "msg": "Command 'verify-policy {u'policy-package': u'standard'}' failed. All changes are discarded and the session is invalidated."

}

Is there anyway to increase the detail of the error response in msg part ?

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

Try changing your API call so it's policy-package Standard (with a capital S) instead of a lower-case s.
Some API calls are case-sensitive.
0 Kudos
oakint
Explorer

Dear Phoneboy

I have tried changing it to Standard but still same result.

fatal: [test1]: FAILED! => {

    "changed": false,

    "invocation": {

        "module_args": {

            "api_version": null,

            "command": "verify-policy",

            "context": "web_api",

            "fingerprint": null,

            "parameters": "{'policy-package': 'Standard'}",

            "session-data": "{'failed': False, 'changed': False, 'response': {'domain': None, 'url': '192.168.56.80:443', 'sid': 's5Kkih3t-clPLX6VunY5QQ0dUniE4zt7r8F5c_rjeM4', 'context': 'web_api', 'fingerprint': '83F58C9B4FE00C1B12456A11AEA756E6A575B205', 'api_version': '1.3'}}"

        }

    },

    "msg": "Command 'verify-policy {u'policy-package': u'Standard'}' failed. All changes are discarded and the session is invalidated."

}

0 Kudos
PhoneBoy
Admin
Admin

The full API call you're making might also provide a clue.
Same with the file(s) gathered by api status -s on the management.
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events