mirror of
https://github.com/cvsickle/cluster-ansible.git
synced 2026-03-12 11:37:53 -04:00
Ansible setup for cluster provisioning
| .github/workflows | ||
| inventory | ||
| playbooks | ||
| templates | ||
| README.md | ||
| run-update.yml | ||
| run.yml | ||
cluster-ansible
Ansible setup for cluster provisioning and maintenance.
- Github: https://github.com/cvsickle/cluster-ansible
- Codeberg: https://codeberg.org/cvsickle/cluster-ansible
Variable setup
Create a variable file from the sample:
cp ./inventory/group_vars/all.yml.sample ./inventory/group_vars/all.yml
Edit the variables to match the setup. Note, Bitwarden secrets can be used. See the commented out portions of the sample variables file. See ansible-integration/ for more information.
Frequently Used Commands
Prepare virtual hosts for k3s install
ansible-playbook run.yml -i ./inventory/virtual.yml
Update k3s installation on all virtual hosts
ansible-playbook run-update.yml -i ./inventory/virtual.yml
Other Example Commands
Note
The
--userargument specifies the user to run commands as on the remote hosts.
Ping host test from test.yml inventory
ansible -i ./inventory/test.yml test -m ping
Run the apt.yml playbook on test.yml inventory
Note
The
--ask-become-passargument will prompt for thesudopassword of the remote hosts.
ansible-playbook ./playbooks/apt.yml -i ./inventory/test.yml