608a21
{%- macro bond(name, slave0, slave1, bootproto=None) -%}
ff2c30
    bond-{{ name }}:
ff2c30
      usercontrol: false
ff2c30
      bonding_master: true
ff2c30
      bonding_module_opts: mode=802.3ad miimon=100 lacp_rate=fast
ff2c30
      bonding_slave0: {{ slave0 }}
ff2c30
      bonding_slave1: {{ slave1 }}
ff2c30
      firewall: false
608a21
      {%- if bootproto %}
608a21
      bootproto: {{ bootproto }}
608a21
      {%- endif %}
ff2c30
{%- endmacro -%}
ff2c30
ff2c30
{%- macro slave(name) -%}
ff2c30
    {{ name }}:
ff2c30
      bootproto: none
ff2c30
      firewall: false
ff2c30
{%- endmacro -%}
ff2c30
ff2c30
{%- macro vlantap(name, vlan_id, device) -%}
ff2c30
    x-{{ name }}:
ff2c30
      bootproto: none
ff2c30
      vlan_id: {{ vlan_id }}
ff2c30
      etherdevice: {{ device }}
ff2c30
      zone: drop
ff2c30
{%- endmacro -%}
d28e89
d28e89
{%- macro redis(instance, tcp=False) -%}
d28e89
redis:
d28e89
  {{ instance }}:
d28e89
    acllog-max-len: 64
d28e89
    databases: 1
d28e89
    tcp-backlog: 512
d28e89
    timeout: 0
d28e89
    {%- if tcp %}
36fc8f
    bind: ::1
d28e89
    port: 6379
ddb283
    {%- else %}
ddb283
    port: 0
d28e89
    {%- endif %}
d28e89
{%- endmacro %}