1. learning ansible

written by relyq

published on: 2023-04-25

setting up ansible

ansible

devops

14:30

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

plan

  1. getting a desktop linux env: i currently don’t have a desktop linux install. i know. first step will be installing ArchWSL
  2. installing ansible: just pacman -S ansible-core and following this article from the archwiki (instead of the official one (cus im a snowflake))
  3. configuring: i dont think i’ll do much config right away but there’s info in the archwiki and official docs
  4. adding hosts to the inventory: also on the archwiki article and official docs
  5. do some tests
  6. ???
  7. profit

what’s next

try recreating some of my LXCs using ansible & integrating with terraform to spin them up automatically

progress

15:49

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

16:31

this article is a great guide to build your inventory
first playbook test

april 26th

01:36

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!!!

img

terraform

ansible

@relyq on discord!!!