What would be the checkpoint firewall ansible_network_os

any idea what should be the ansible_network_os for checkpoint. I am getting below error while running my playbook

TASK [SHOW COMMAND] *************************************************************************************************************************************************************************
fatal: [HQFW]: FAILED! => {“msg”: “Unable to automatically determine host network os. Please manually configure ansible_network_os value for this host”}

my default shell is bash.

Hello Tribhuvan Yadav

ansible_network_os informs Ansible which Network platform the hosts corresponds to. This is required when using ansible_connection=network_cli.
For network_cli connection methods the ansible_network_os variable must be set. This variable informs Ansible which network platform each host corresponds to. For example, if the device is a Juniper router, ansible_network_os must be set to junos. This can be set as a variable or even within the inventory itself. Refer to the following table for the networking platforms corresponding ansible_network_os parameter:

you can use ansible_network_os in an inventory. for example:

[ios]
ios01.example.net

[ios:vars]
ansible_connection=network_cli
ansible_user=username
ansible_become=yes
ansible_become_method=enable
ansible_network_os=ios
or directly in playbook

Or you can use ansible_network_os in playbooks. For example:

`

  • name: Gather facts (ops)
    ios_facts:
    when: ansible_network_os == ‘ios’
    `

Please revert in case of any query.

Thanks
Soniya

Hello Soniya,

Thank you for the reply and all the information but here i am looking specifically for the checkpoint firewall os name which i should mention.
ansible_network _os: ? (for checkpoint firewall)

Regards
Tribs

(attachments)

Try with:

ansible_connection=httpapi ansible_network_os=checkpoint

Hello Ganesh,

Below error is coming when using httpapi:

TASK [trib_role : SHOW CONFIG] **************************************************************************************************************************************************************************************************************
fatal: [firewall]: FAILED! => {“msg”: “unable to load API plugin for network_os checkpoint”}
to retry, use: --limit @/etc/ansible/cp1.retry

When i am using network_cli then below error is coming:

-bash-4.2$ ansible-playbook cp2.yml

PLAY [CheckPoint health Status] *************************************************************************************************************************************************************************************************************

TASK [checkpoint healthcheck commands] ******************************************************************************************************************************************************************************************************
fatal: [firewall]: FAILED! => {“msg”: “unable to set terminal parameters”}

My Playbooks: (Playbook 1)

in /etc/ansible directory:

Checkpoint module shipped with ansible/ansible does not support cli_command/cli_config modules or connection=network_cli
Refer the supported checkpoint module here: https://docs.ansible.com/ansible/latest/modules/list_of_network_modules.html#checkpoint

Hello Ganesh,

It does support these modules. I have already tested in my test lab environment.
It’s just the production where i am getting these error messages and need help.

Regards
Tribs