Comments (3)
all:
hosts:
terraform_node:
ansible_host: localhost
ansible_connection: local
hypervisor_1:
terraform_target_hypervisor: thinkpad-w540.lan
terraform_target_hypervisor_user: root
terraform_target_hypervisor_port: 22
terraform_target_hypervisor_password: password
hypervisor_2:
terraform_target_hypervisor: 10.90.20.12
terraform_target_hypervisor_user: root
terraform_target_hypervisor_port: 22
terraform_target_hypervisor_password: password
children:
deploy:
vars:
disk_source: "/var/lib/libvirt/images/_Centos-8-template.qcow2"
os_family: RedHat
pool_name: default
ssh_password: root
ssh_port: 22
ssh_user: root
ssh_public_key_file: '~/.ssh/id_rsa.pub'
set_new_password: password123
children:
master_nodes:
hosts:
master-node-0:
os_family: FreeBSD
disk_source: "/var/lib/libvirt/images/_freebsd-terraform.qcow2"
cpu: 2
memory: 1024
ansible_host: 192.168.122.200
hypervisor: hypervisor_1
network_interfaces:
if-0:
name: default
ip: 192.168.122.200
gw: 192.168.122.1
mac_address: "AA:BB:CC:11:24:67"
type: nat
dns:
- 192.168.122.1
if-1:
name: enp0s25
ip: 192.168.100.200
gw: 192.168.100.1
mac_address: "AA:BB:CC:11:25:67"
type: macvtap
default_route: True
dns:
- 192.168.100.1
slave_nodes:
hosts:
slave-node-0:
os_family: Debian
disk_source: "/var/lib/libvirt/images/_debian10-terraform.qcow2"
cpu: 1
memory: 512
hypervisor: hypervisor_2
ansible_host: 192.168.122.201
network_interfaces:
if-0:
name: default
ip: 192.168.122.201
gw: 192.168.122.1
mac_address: "AA:BB:CC:11:24:68"
type: nat
dns:
- 192.168.122.1
if-1:
name: enp0s25
ip: 192.168.100.201
gw: 192.168.100.1
type: macvtap
default_route: True
dns:
- 192.168.100.1
if-2:
name: enp0s25
ip: 192.168.100.211
gw: 192.168.100.1
type: macvtap
dns:
- 192.168.100.1
This is a first approach of the idea, shift all the VMs in the group deploy
(that will be used as hosts
in main.yml), specify hypervisors and terraform_nodes as hosts outside of this group.
Link each VM to his own hypervisor, and let the setup_vars.yml task set the various inferences based on this.
main.yml:
- hosts: deploy
gather_facts: False
max_fail_percentage: 0
roles:
- terraform
from terrible.
Initial work on multi-hypervisor
move node's hypervisor membership from group definition to variable
definition.
Hypervisors are now hosts (not included in the run) and affinity is
defined on per-VM level.
from terrible.
We will move in the direction of removing custom variables like terraform_target_hypervisor
and simply use the ansible_host
variables for hypervisors.
This will not only simplify documentation and setup (less custom variables, more standard values), but will initialize the work needed for #34
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.