Skip to content

Instantly share code, notes, and snippets.

@rohitthakur2590
Created March 19, 2020 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohitthakur2590/5ab80cc18616564dd6fa531dc595e738 to your computer and use it in GitHub Desktop.
Save rohitthakur2590/5ab80cc18616564dd6fa531dc595e738 to your computer and use it in GitHub Desktop.
++++++++++++++++++++++++++++++++++
Directory structure
/home/rothakur/ansible-collections/collections/ansible_collections
|__ansible
| |__netcommon
|__ansible-base
|__vyos
|__vyos
|__plugins
|__tests
++++++++++++++++++++++++++++
ansible.cfg
[defaults]
inventory=./inventory
collections_paths = /home/rothakur/ansible-collections/collections/ansible_collections/vyos/vyos
++++++++++++++++++++++++++++
inventory
[vyos]
192.168.56.101
#192.168.56.107
[vyos:vars]
ansible_network_os=vyos.vyos.vyos
ansible_ssh_user=vyos
ansible_ssh_pass=vyos
ansible_connection=ansible.netcommon.network_cli
ansible_become=yes
++++++++++++++++++++++++++++++++
playbook
---
- hosts: vyos
collections:
- vyos.vyos
gather_facts: true
tasks:
- name: interfaces
interfaces:
config:
- name: eth1
description: "Demo: test 2"
state: merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment