emcstack.bonding

Bonding Role

This role helps to create and set up bonding network interfaces correctly.

Requirements

You need Ansible 2.0 and the python-netaddr library.

Role Variables

Name Type Required Default Description
slaves list yes None List of slave interfaces that will be bonded together.
bond string yes None Name of the bonding interface.
apply boolean no false Set to true to save the configuration files.
apply_now boolean no false Restart the network after saving the config files.
el_network_sysconfig string no /etc/sysconfig/network-scripts Default directory for Red Hat/CentOS systems.
tmp_dir string no /tmp Temporary directory for configuration files.
bond_options list of dict no [{ 'key': 'mode', 'value': 'lacp'}, { 'key': 'miimon', 'value': '80'}] Default values for bonding options.
mtu int no 1500 Maximum Transmission Unit size for the interface.
enable_ipv4 boolean no false Use IPv4 settings for the bond interface.
manage_gateway boolean no false Configure the gateway on the bond.
manage_dns_servers boolean no false Set DNS settings for the bond configuration.
manage_hw_addr boolean no true Write the hardware address in the slave configurations.
ip_addr string no None IPv4 address for the bond interface.
netmask string no None Netmask for the bond interface.
gateway string no None Gateway for the bond interface.
dns1 string no None First DNS server.
dns2 string no None Second DNS server.
enable_ipv6 boolean no true Enable IPv6 on the bond interface.
init_ipv6 boolean no true Enable IPv6 initialization.
ipv6_autoconf boolean no no Enable IPv6 autoconfiguration.
keep_slave_ipv4 boolean no false Keep the existing IPv4 configuration on slaves.

Dependencies

None.

Example Playbook

- hosts: nc-9
  roles:
  - bonding
  vars:
    slaves:
      - eth0
      - eth1
    bond: bond0
- hosts: nc-9
  roles:
  - bonding
  vars:
    slaves:
      - eth0
      - eth1
    bond: bond0
    bond_options:
      - { 'key': 'mode', 'value': '4'}
      - { 'key': 'miimon', 'value': '100'}
      - { 'key': 'xmit_hash_policy', 'value': 'layer2+3'}
      - { 'key': 'lacp_rate', 'value': 'fast'}
      - { 'key': 'ad_select', 'value': 'bandwidth'}

License

GPLv3

Author Information

John Preston [John Mille]

Informazioni sul progetto

Bond configuration files creator

Installa
ansible-galaxy install emcstack.bonding
Licenza
lgpl-3.0
Download
73
Proprietario
Eucalyptus - Midokura - CEPH