network ansible command error: "msg": "network os centos is not supported"
This error is due to invalid value of ansible_network_os:
The playbook you try setup is meant for network devices.
And since centos is not a network device OS the playbook will fail.
Here you can find supported network OS.
Ansible Documentation: ansible_network_os values
If you don't have any device running a supported network OS I recommend you to follow the regular user guide.
Ansible User Guide
My suggestion is to setup a easy playbook that will run on the environment you have.
Get the understanding of following concepts.
Control node
Managed nodes
Inventory
Modules
Tasks
Playbooks
Here is a short example.
This will only execute hostname do confirm it execute on expected host.
Let's say nicholas is your control node and rolly is the managed node.
On nicholas:
Create a inventory as before with your control node and managed node.
inventory.txt:
[local]
localhost ansible_connection=local

[managed_node]
rolly ansible_host=&lt;rolly ip&gt; ansible_user=&lt;rolly user&gt; ansible_ssh_pass=&lt;rolly user password&gt;

myplaybook.yml:
---
- name: This will get hostname localy on control node
  hosts: localhost
  tasks:
    - name: get hostname
      command: hostname
      register: result

    - name: print hostname
      debug:
          var: result

- name: This will get hostname remote on manged node
  hosts: rolly
  tasks:
    - name: get hostname
      command: hostname
      register: result

    - name: print hostname
      debug:
          var: result

And then execute on the control node:
ansible-playbook -i inventory.txt myplaybook.yml