Skip to content

Instantly share code, notes, and snippets.

@nweddle
Last active November 3, 2015 23:49
Show Gist options
  • Save nweddle/78440a857cc001afaaa1 to your computer and use it in GitHub Desktop.
Save nweddle/78440a857cc001afaaa1 to your computer and use it in GitHub Desktop.
Simple 'network_interfaces_v2' recipe to configure Test Kitchen CentOS 7.1 networking
#
# Cookbook Name:: myresolve
# Recipe:: default
#
# Copyright (c) 2015 Nathan Weddle, All Rights Reserved.
# Configure the loopback interface
network_interface 'lo' do
# We set reload equal to false, so that we are not kicked out of our TK run
reload false
onboot true
nm_controlled true
bootproto 'static'
address '127.0.0.1'
netmask '255.0.0.0'
network '127.0.0.0'
broadcast '127.255.255.255'
end
# Configure the Test Kitchen vm network interface
network_interface 'enp0s3' do
onboot true
nm_controlled true
dns [ '8.8.8.8' , '8.8.4.4' ]
dns_domain 'int.example.org'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment