I am trying to create a host on my SMS using Ansible but i am encountering some issues.
Below are some information that might be helpful.
Playbook:
---
- name: Checkpoint Hosts Management
hosts: firewalls_checkpoint
tasks:
- name: Add a new Host
check_point.mgmt.cp_mgmt_host:
ip_address: 192.0.2.1
name: New Host 1
state: present
auto_publish_session: yes
Inventory
#This is a group of remote servers for Checkpoint SMS
[firewalls_checkpoint]
ckp_sms
#These are global variables for the group firewalls
[firewalls_checkpoint:vars]
ansible_httpapi_use_ssl=True
ansible_httpapi_validate_certs=False
ansible_user=admin
ansible_password=*****
ansible_ssh_pass=*****
ansible_network_os=check_point.mgmt.checkpoint
ansible_ssh_transfer_method=scp
ansible.cfg
[defaults]
host_key_checking = False
[ssh_connection]
scp_if_ssh=True
timeout = 100
However, when i run my playbook with command ansible-playbook /etc/ansible/playbooks/checkpoint/network_create.yml, i get the following error:
fatal: [ckp_sms]: FAILED! => {
"msg": "failed to transfer file to /root/.ansible/tmp/ansible-local-71858l7zedua/tmpj8i_7uay CLINFR0711 Command insecure/AnsiballZ_setup.py:\n\nCLINFR0329 Invalid command:'scp -t 'CLINFR0711 Command insecure/AnsiballZ_setup.py''.\n"
}
If i ssh directly on a terminal to the SMS, it works fine.
I get the same error message when i try to ping the sms using ansible -m ping
Can someone please help me out.