HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib/python3.9/site-packages/ansible_collections/dellemc/os9/roles/os9_vrf/templates/os9_vrf.j2
#jinja2: trim_blocks: True,lstrip_blocks: True
{################################
Purpose:
Configure VRF on os9 Devices.
os9_vrf:
  vrfdetails:
   - vrf_id: 1
     vrf_name: VLTi-KEEPALIVE
     description: VRF-to-support-Peer-Keepalive-Link
     state: present
     tagged_portname: 
      - port: fortyGige 1/2
        state: present
      - port: fortyGige 1/3
        state: absent
################################}
{% if (os9_vrf is defined and os9_vrf) %}
{% if os9_vrf.vrfdetails is defined %}
  {% for vrf in os9_vrf.vrfdetails %}
    {% if vrf.vrf_name is defined %}
      {% if vrf.vrf_name %}
        {% if vrf.state is defined and vrf.state == 'absent' %}
          {% if vrf.tagged_portname is defined and vrf.tagged_portname %}
            {% for tag in vrf.tagged_portname %}
              {% if tag.state is defined and tag.state == 'absent' %}
                {% if tag.port is defined and tag.port %}
interface {{ tag.port }}
 no ip vrf forwarding
 exit
                {% endif %}
              {% endif %}
            {% endfor %}
          {% endif %}
no ip vrf {{ vrf.vrf_name }}
        {% else %}
          {% if vrf.vrf_id is defined %}
            {% if vrf.vrf_id %}
feature vrf
ip vrf {{ vrf.vrf_name }} {{ vrf.vrf_id }}
              {% if vrf.description is defined %}
                {% if vrf.description %}
 description {{ vrf.description }}
                {% else %}
 no description sample
                {% endif %}
              {% endif %}
              {% if vrf.tagged_portname is defined %}
                {% if vrf.tagged_portname %}
                  {% for tag in vrf.tagged_portname %}
                    {% if tag.port is defined and tag.port %}
interface {{ tag.port }}
                    {% if tag.state is defined and tag.state == 'absent' %}
 no ip vrf forwarding 
                    {% else %}
 ip vrf forwarding {{ vrf.vrf_name }} 
                    {% endif %}
                    {% endif %}
                  {% endfor %}
                {% endif %}
              {% endif %}
            {% endif %}
          {% endif %}
        {% endif %}
      {% endif %}
    {% endif %}
  {% endfor %}
{% endif %}
{% endif %}