Skip to content

Commit

Permalink
Add vagrant static network support
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Tie committed May 4, 2016
1 parent 67372aa commit 919eeb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ simply be named vagrant-01 instead of vagrant-01-rhel-7.
type: dhcp
auto_config: true
auto_config: false
- network_name: private_network
type: static
ip: 192.168.0.1
options:
append_platform_to_hostname: no
raw_config_args:
Expand Down
1 change: 1 addition & 0 deletions molecule/templates/vagrantfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Vagrant.configure('2') do |config|
c.vm.hostname = '{{ instance.vm_name }}'
{%- for interface in instance.interfaces %}
c.vm.network '{{ interface.network_name }}', type: '{{ interface.type }}', auto_config: {{ interface.auto_config|lower }}
{%- if interface.type == 'static' %}, ip: '{{ interface.ip }}' {%- endif -%}
{%- endfor %}
{%- if 'raw_config_args' in instance %}
{%- for line in instance.raw_config_args %}
Expand Down

0 comments on commit 919eeb1

Please sign in to comment.