Comments (2)
We could setup the declaration of the interfaces this way:
ifaces_example:
iface_1:
name: ens0
type: "nat"
ip: 192.168.122.12
# mac_address: ...
iface_2:
name: ens1
type: "bridge"
ip: 192.168.124.199
# mac_address: ...
iface_3:
name: ens2
type: "bridge"
ip: 10.80.80.23
# mac_address: ...
and then in te terraform use this to template
{% for iface in ifaces_example %}
{% if ifaces_example[iface].type == "nat" %}
# uses static IP
network_interface {
network_name = "{{ network_name }}"
hostname = var.hostname
addresses = ["{{ ifaces_example[iface].ip }}"]
{% if ifaces_example[iface].mac_address is defined %}
mac = "{{ ifaces_example[iface].mac_address }}"
{% endif %}
wait_for_lease = true
}
{% elif ifaces_example[iface].type == "bridge" %}
network_interface {
bridge = "{{ ifaces_example[iface].name }}"
hostname = var.hostname
}
{% elif ifaces_example[iface].type == "bridge" %}
network_interface {
macvtap = "{{ ifaces_example[iface].name }}"
hostname = var.hostname
}
{% endif %}
{% endfor %}
from terrible.
Working on the implementation in branch 1_networking_refactor,
we need to implement the network restarting phase that is proper to the various distro's network management.
from terrible.
Related Issues (20)
- [IMPROVEMENT] Add support for Windows guests HOT 9
- [IMPROVEMENT] Add support for custom commands at the end of the run
- [BUG] Saved state handling does not manage well remote terraform hosts
- [IMPROVEMENT] Support non-netplan Ubuntu
- [IMPROVEMENT] Add custom state output folder
- [DOCUMENTATION] improve code commenting HOT 1
- [BUG] terraform depends on dhcp leases
- [IMPROVEMENT] Support non-root users
- [IMPROVEMENT] Update Dockerfile with last Terrible version HOT 5
- [IMPROVEMENT] Add more targets to CI pipeline HOT 2
- [IMPROVEMENT] Improve network interface detection
- [IMPROVEMENT] Add support for executing commands on-destroy
- [CI] Migrate from TravisCI
- [IMPROVEMENT] Security updates should not be enforced HOT 1
- [IMPROVEMENT] Improve Asserts HOT 3
- [IMPROVEMENT] Support for other providers
- [BUG] Docker file should use the corrert source
- [IMPROVEMENT] Improve inventory defaults
- [IMPROVEMENT] Add basic tooling
- [IMPROVEMENT] Add support for other type of networks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terrible.