Skip to content

Instantly share code, notes, and snippets.

@adam-stokes
Created February 7, 2015 02:42
Show Gist options
  • Save adam-stokes/edacd7abea5446d8bcc1 to your computer and use it in GitHub Desktop.
Save adam-stokes/edacd7abea5446d8bcc1 to your computer and use it in GitHub Desktop.
# vlan config
bucket:
&myinterfaces |
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto vlan5
auto vlan100
iface vlan5 inet static
address 10.0.0.18
netmask 255.255.255.0
vlan-raw-device eth0
iface vlan100 inet static
address 192.168.66.118
netmask 255.255.255.0
vlan-raw-device eth0
#cloud-config
debconf_selections:
maas: |
{{for line in str(curtin_preseed).splitlines()}}
{{line}}
{{endfor}}
early_commands:
update: apt-get update
vlan: apt-get install vlan -q -y
late_commands:
maas: [wget, '--no-proxy', '{{node_disable_pxe_url|escape.shell}}', '--post-data', '{{node_disable_pxe_data|escape.shell}}', '-O', '/dev/null']
load_8021q: ['sh', '-c', 'echo 8021q >> $TARGET_MOUNT_POINT/etc/modules']
network_commands:
vlans: ['sh', '-c', 'printf "$1" > "$OUTPUT_INTERFACES"', '--', *myinterfaces]
power_state:
mode: reboot
{{if node.architecture in {'i386/generic', 'amd64/generic'} }}
apt_mirror: http://{{main_archive_hostname}}/{{main_archive_directory}}
{{ else }}
apt_mirror: http://{{ports_archive_hostname}}/{{ports_archive_directory}}
{{endif}}
{{if http_proxy}}
apt_proxy: {{http_proxy}}
{{else}}
apt_proxy: http://{{server_host}}:8000/
{{endif}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment