written by relyq
published on: 2023-04-25
setting up ansible
last sunday i learned the basics of terraform
i haven’t really used it for much but today i want to learn ansible so i can integrate both into my IaC setup
pacman -S ansible-core
and following this article from the archwiki (instead of the official one (cus im a snowflake))try recreating some of my LXCs using ansible & integrating with terraform to spin them up automatically
archwsl already installed with fish shell & a basic vim config. also installed ansible, copied the default conf and added some of my hosts. now to do some test automation
this article is a great guide to build your inventory
first playbook test
well it was a busy day and dad visited to have dinner but i did end up getting an ansible playbook to deploy a minecraft server working by the end of the day
as of now i just copy my scripts and config files, but i plan on using templates for the config files and most importantly integrating terraform & ansible into a seamless workflow to spin up a new instance with a single line
the docs for the Ansible.Builtin modules were probably the most useful thing i read today
a big challenge will be getting the local ip of the new LXC after creating it with terraform. i can get the ip for VMs from the qemu agent but there’s no such thing for LXCs afaik. i’ve already been thinking about it and it seems i’ll have to write a one-liner to ssh into PVE and do lxc-info with the vmid of the LXC.
that will be a problem for tomorrow relyq
thank u for reading!!!
terraform
ansible
@relyq on discord!!!