Blob Blame History Raw
{%- macro bond(name, slave0, slave1, bootproto=None) -%}
    bond-{{ name }}:
      usercontrol: false
      bonding_master: true
      bonding_module_opts: mode=802.3ad miimon=100 lacp_rate=fast
      bonding_slave0: {{ slave0 }}
      bonding_slave1: {{ slave1 }}
      firewall: false
      {%- if bootproto %}
      bootproto: {{ bootproto }}
      {%- endif %}
{%- endmacro -%}

{%- macro slave(name) -%}
    {{ name }}:
      bootproto: none
      firewall: false
{%- endmacro -%}

{%- macro vlantap(name, vlan_id, device) -%}
    x-{{ name }}:
      bootproto: none
      vlan_id: {{ vlan_id }}
      etherdevice: {{ device }}
      zone: drop
{%- endmacro -%}

{%- macro redis(instance, tcp=False) -%}
redis:
  {{ instance }}:
    acllog-max-len: 64
    databases: 1
    tcp-backlog: 512
    timeout: 0
    {%- if tcp %}
    bind: ::1
    port: 6379
    {%- else %}
    port: 0
    {%- endif %}
{%- endmacro %}