-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
enhancementNew feature or requestNew feature or requestexperimentalThis issue needs a deep research and some improvement evaluationThis issue needs a deep research and some improvement evaluationhelp wantedExtra attention is neededExtra attention is neededrefactoringImprove the code readability changing nomenclature and/or some other thingsImprove the code readability changing nomenclature and/or some other things
Milestone
Description
Right now, setting up a VM can be quite a bit of YAML code, so we should improve this giving better and sane defaults for all aspects of a VM
Right now we could improve setting up:
- if only 1 network is defined, it's
default_routeby default - if only 1 network is defined, DNS and Gateway will default to xxx.xxx.xxx.1
- if only 1 network is defined, IP should default to
ansible_host - if a disk is declared, it will default to the first FStype (ext4, ufs, etc...)
- if a disk is declared, it will default mount to
/mnt/${ disk name } - if a disk is declared, it will default to the
pool_name - if a disk is declared, and it's a
swapit should defaultmount_pointtononewithout having to declare it pool_nameshould default todefault- if only 1 hypervisor is declared, VMs should default to it.
Ideally a simple inventory without many variables should be able to declare VMs in a simple manner like:
all:
vars:
disk_source: "/mnt/template.qcow2"
os_family: RedHat
hosts:
terraform_node:
ansible_host: localhost
ansible_connection: local
hypervisor_1:
ansible_host: 10.90.20.12
ansible_user: root
children:
deploy:
children:
my_nodes:
hosts:
node-0:
cpu: 2
memory: 2512
ansible_host: 192.168.122.200
data_disks:
disk-1:
size: 5
...
Or even simpler if no external disks are declared
all:
vars:
disk_source: "/mnt/template.qcow2"
os_family: RedHat
hosts:
terraform_node:
ansible_host: localhost
ansible_connection: local
hypervisor_1:
ansible_host: 10.90.20.12
ansible_user: root
children:
deploy:
children:
my_nodes:
hosts:
node-0:
cpu: 2
memory: 2512
ansible_host: 192.168.122.200
node-1:
cpu: 2
memory: 2512
ansible_host: 192.168.122.201
....Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestexperimentalThis issue needs a deep research and some improvement evaluationThis issue needs a deep research and some improvement evaluationhelp wantedExtra attention is neededExtra attention is neededrefactoringImprove the code readability changing nomenclature and/or some other thingsImprove the code readability changing nomenclature and/or some other things