- hosts: testing
gather_facts: no
collections:
- fortinet.fortios
tasks:
- name: Get system status using CLI
raw: get system status
register: system_status_output
- debug:
var: system_status_output.stdout_lines
- name: Get license status
fortinet.fortios.fortios_monitor_fact:
vdom: root
selectors:
- selector: license_status
- selector: system_status
- selector: firewall_security-policy
params:
policyid: '1'
I'm trying to execute commands with fortios module via ssh - username and password. (Not ssh key)
'"'"'echo ~admin && sleep 0'"'"'' is being used by ssh even though I have mentioned ansible_network_os=fortinet.fortios.fortios in the inventory file.
The commands using raw works but I'm unable to use any of the fortios modules. The same error occurs everytime.
hosts_css (Inventory):
pls.yml (playbook):
ansible.cfg:
Task with raw module gets executed properly:
This is the debug output for Get license status task which I tried to execute with fortinet.fortios.fortios_monitor_fact:
I'm unable to use any fortios module as I'm getting the same error.