Workflows¶
This document outlines the common workflows for testing and setting up new hosts in this project.
Testing Workflow¶
This workflow describes the process for testing a new Ansible task before deploying it to all hosts.
-
Add a Test Host:
Add the IP address of your test host to the
inventory/single.yamlfile under thehostssection. -
Create a Test Task:
Create your test task in the
playbooks/test.yamlfile. This playbook is configured to run on thesinglehost group. -
Run the Test Playbook:
Execute the test playbook to apply the task to your test host:
-
Deploy to All Hosts:
Once you have verified that the task works as expected, you can deploy it to all other hosts using one of the following playbooks:
playbooks/task_all.yaml: Deploys the task to all LXC containers and Raspberry Pis.playbooks/task_lxcAll.yaml: Deploys the task to all LXC containers.
-
Incorporate into
setupRole:After successful deployment, incorporate the new task into the
roles/setuprole. This ensures that the task is included in the setup process for new single hosts.
Setting up a Single Host¶
This workflow describes how to set up a new single host using the setup role. This role is designed to apply a generic Linux configuration to a new host.
-
Add the Host to Inventory:
Add the new host to your Ansible inventory. You can either add it to an existing inventory file or create a new one.
I prefer to add it to my
inventory -
Create a Playbook:
Create a new playbook that targets the new host and includes the
setuprole. -
Run the Playbook:
Execute the playbook to configure the new host: