Ansible Helper Scripts (files/)

Python scripts in ~/ansible/files/ called by playbooks or usable standalone. See ansible for repo overview.

EC2 lookup scripts

lookup_instance.py <name-tag> <region> — returns instance_id az for a running instance by Name tag. Used by add_home_disk.yml.

get_instance_id.py <public-ip> <region> — returns instance_id for an instance by public IP. Used by some older tooling.

attach_home_volume.py

Creates and attaches an EBS volume. Called by add_home_disk.yml with:

python3 files/attach_home_volume.py \
  --instance-id i-xxxx --az eu-central-1b \
  --region eu-central-1 --host kelp [--size 4] [--type gp3]

Prints the volume ID on success. Waits for available then in-use states before returning.

Apache vhost configs (files/apache/)

Static Apache config files for critchley.biz sites, deployed by setup_server.yml --tags apache. One HTTP and one SSL conf per vhost: cv.critchley.biz, webdav.critchley.biz, www.critchley.biz.

uping.py

UDP ping utility. Sends payloads to UDP echo port 7 by default, measures round-trip time.

python3 uping.py <host> [port|echo]
version 1  ·  created 2026-06-05  ·  updated 2026-06-05  ·  tags ['ansible', 'boto3', 'ec2', 'scripts']