add ansible test inventory
start provisionning vm disk
This commit is contained in:
parent
6c34a92eeb
commit
0c6bf50322
3
packer/assets/ansible/inventory_test.ini
Normal file
3
packer/assets/ansible/inventory_test.ini
Normal file
@ -0,0 +1,3 @@
|
||||
[default]
|
||||
100.64.0.24 ansible_ssh_pass=toor ansible_ssh_port=5556 ansible_user=root
|
||||
|
19
packer/assets/ansible/roles/setup/tasks/partition.yml
Normal file
19
packer/assets/ansible/roles/setup/tasks/partition.yml
Normal 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
13
test.sh
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user