#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . # ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'core'} DOCUMENTATION = """ --- module: net_vrf version_added: "2.4" author: "Ricardo Carrillo Cruz (@rcarrillocruz)" short_description: Manage VRFs on network devices description: - This module provides declarative management of VRFs on network devices. options: name: description: - Name of the VRF. interfaces: description: - List of interfaces the VRF should be configured on. collection: description: List of VRFs definitions purge: description: - Purge VRFs not defined in the collections parameter. default: no state: description: - State of the VRF configuration. default: present choices: ['present', 'absent'] """ EXAMPLES = """ - name: Create VRF named MANAGEMENT net_vrf: name: MANAGEMENT - name: remove VRF named MANAGEMENT net_vrf: name: MANAGEMENT state: absent """ RETURN = """ commands: description: The list of configuration mode commands to send to the device returned: always type: list sample: - vrf definition MANAGEMENT """