add ansible test inventory

start provisionning vm disk
This commit is contained in:
Antoine 2020-02-14 07:56:41 +01:00
parent 6c34a92eeb
commit 0c6bf50322
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,3 @@
[default]
100.64.0.24 ansible_ssh_pass=toor ansible_ssh_port=5556 ansible_user=root

View File

@ -0,0 +1,19 @@
---
# partition disk to install gentoo
- name: "Create a new primary partition with a size of 1GiB"
parted:
device: /dev/sdb
number: 1
state: present
part_end: 1GiB
- name: "Create a new primary partition for LVM"
parted:
device: /dev/sdb
number: 2
flags: [ lvm ]
state: present
part_start: 1GiB

13
test.sh
View File

@ -1,3 +1,14 @@
#!/bin/bash
qemu-system-x86_64 -cdrom ./packer/assets/install-amd64-minimal-20200205T214502Z.iso -boot order=b -m 1024 -smp cpus=1,cores=4
qemu-system-x86_64 \
-cdrom ./packer/assets/install-amd64-minimal-20200205T214502Z.iso \
-boot order=d -m 1024 \
-smp cpus=1,sockets=2,maxcpus=2 \
-drive "file=../../VirtualBox VMs/gentoo_snapshot.cow,format=qcow2,index=1" \
-device virtio-net,netdev=user.0 \
-netdev user,id=user.0,hostfwd=tcp::5556-:22
# run playbook on aready running qemu vm
# ansible-playbook -i inventory_test.ini playbook.yml --extra-vars "ssh_pub=$(cat ../id_rsa_qemu) geenrated_user=antoine generated_group=antoine"