Skip to content

whslabs/packer-development

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packer build development.pkr.hcl
./build.sh
# Start a vm
(
name=development
cp output-development/packer-development $name.qcow2
guestfish << EOF
add $name.qcow2
run
mount /dev/debian-vg/root /
write /etc/hostname debian11-$name
EOF
virt-install \
  --disk $name.qcow2 \
  --import \
  --memory 2048 \
  --name debian11-$name \
  --network bridge:virbr0 \
  --os-variant debian11 \
  --vcpus 2 \
  ;
)

Ansible

cd ansible/
ansible-playbook -idefault, -clocal playbook.yaml -K

List roles

find ansible/ \
-maxdepth 1 \
-mindepth 1 \
-type d | xargs -I{} bash -c 'f={}; echo ${f#*-}'