I’m getting an unable to automatically determine host network os. Please manually configure ansible_network_os value for this host. I tried several ways to add ansible_network_os to the yml file but it didn’t work. I tried to use a var attribute in the yml file but it didn’t work. Please advise with an example. thanks.
- hosts: all
vars:
ansible_network_os: cisco.ios.ios # set for a play
tasks:
- ios_command:
command: "{{ cmd }}"
vars:
ansible_network_os: cisco.ios.ios # set for individual task