This repo contains some ansible playbooks to help setting up a tinkerbell testing environment. By default, it uses the hosts contained locally in the hosts
file.
-
This playbook verifies the machine has python installed, and if it doesn't, installs it.
-
Sets up the environment and runs
setup.sh
, which pulls all the images and downloads OSIE. Ifcopy_osie: true
, then instead of downloading OSIE it copies it from the ansible host. It also starts all services included in thedocker-compose.yml
file. -
Creates tinkerbell templates for the templates inside
templates/
. Make sure the files don't contain any spaces! -
Attributes the template specified in the
template
variable to each host under theworker
group by creating a workflow for it. -
All the above :)
Some inventory variables are required to correctly set up tinkerbell:
network_interface
: The name of the network interface (as shown inip a
) tinkerbell should use on the provisioner.gateway_ip
: The IP the provisioner should have on the internal network, that workers will use to reach it. Doesn't need to match the value inansible_host
, as it will be added if needed.
mac_address
: The mac address of the hardware to be added.uuid
: A random UUID to identify this worker.template
: Which template should be assigned to this worker when creating a new workflow.gateway
: IP address of the provisioner. Should probably matchgateway_ip
from abovenetmask
: Netmask for the worker's network.
- docker-compose up as a handler
- Generic templates
- Allow a list of templates to be passed
- Make template generation idempotent
- Make workflow generation idempotent
- Dynamic inventory
- Maybe organize into roles?