remove repetition of virt_install_command
This commit is contained in:
parent
fd2afa9760
commit
e175491fb7
11 changed files with 24 additions and 64 deletions
|
|
@ -11,3 +11,22 @@ datacenter: phx2
|
|||
# '-A INPUT -p tcp -m tcp --dport 8889 -j ACCEPT' ]
|
||||
|
||||
|
||||
# defaults for virt installs
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
mem_size: 2048
|
||||
num_cpus: 2
|
||||
lvm_size: 20000
|
||||
|
||||
# default virt install command is for a single nic-device
|
||||
# define in another group file for more nics (see buildvm)
|
||||
virt_install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0
|
||||
hostname=${inventory_hostname}"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,7 @@
|
|||
---
|
||||
# common items for the releng-* boxes
|
||||
lvm_size: 20000
|
||||
mem_size: 4096
|
||||
num_cpus: 2
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
|||
|
|
@ -3,14 +3,6 @@
|
|||
lvm_size: 20000
|
||||
mem_size: 1024
|
||||
num_cpus: 2
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
|||
|
|
@ -1,16 +1,7 @@
|
|||
---
|
||||
# common items for the releng-* boxes
|
||||
lvm_size: 20000
|
||||
mem_size: 4096
|
||||
num_cpus: 2
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
|||
|
|
@ -3,14 +3,6 @@
|
|||
lvm_size: 20000
|
||||
mem_size: 1024
|
||||
num_cpus: 2
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ nm: 255.255.255.0
|
|||
gw: 10.5.125.254
|
||||
dns: 10.5.126.21
|
||||
volgroup: /dev/vg_host01
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
virt_install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0
|
||||
hostname=${inventory_hostname}"
|
||||
--network=bridge=br0 --network=bridge=br1 --graphics none
|
||||
--autostart --noautoconsole
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,7 @@
|
|||
---
|
||||
# common items for the releng-* boxes
|
||||
lvm_size: 20000
|
||||
mem_size: 4096
|
||||
num_cpus: 2
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
|||
|
|
@ -3,14 +3,6 @@
|
|||
lvm_size: 50000
|
||||
mem_size: 1024
|
||||
num_cpus: 2
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
|
|
|||
|
|
@ -3,15 +3,6 @@
|
|||
lvm_size: 20000
|
||||
mem_size: 4096
|
||||
num_cpus: 4
|
||||
ks_url: http://infrastructure.fedoraproject.org/repo/rhel/ks/kvm-rhel-6
|
||||
ks_repo: http://infrastructure.fedoraproject.org/repo/rhel/RHEL6-x86_64/
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
gateway=${gw} dns=${dns} console=tty0 console=ttyS0"
|
||||
--network=bridge=br0 --autostart --noautoconsole
|
||||
|
||||
# for systems that do not match the above - specify the same parameter in
|
||||
# the host_vars/$hostname file
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ nm: 255.255.255.0
|
|||
gw: 10.5.125.254
|
||||
dns: 10.5.126.21
|
||||
volgroup: /dev/vg_host01
|
||||
install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
virt_install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_size}
|
||||
--disk ${volgroup}/${inventory_hostname}
|
||||
--vcpus=${num_cpus} -l ${ks_repo} -x
|
||||
"ksdevice=eth0 ks=${ks_url} ip=${eth0_ip} netmask=${nm}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: run the virt-install
|
||||
shell: ${install_command}
|
||||
shell: ${virt_install_command}
|
||||
delegate_to: $vmhost
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue