44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
---
|
|
###########################################################################
|
|
#
|
|
# This is the top level playbook for the 'microk8s' role.
|
|
#
|
|
# This role will install a microk8s cluster to three or more target hosts.
|
|
#
|
|
# This role requires at least three target hosts, previously deployed. Each
|
|
# host should have at least 4GB of RAM and at least a 20GB disk. The hosts
|
|
# should also be running Ubuntu LTS; 18.04, 20.04 or 22.04.
|
|
#
|
|
# It is also assumed that the user running the playbook has SSH key access
|
|
# set up for the root user on the target hosts.
|
|
#
|
|
###########################################################################
|
|
#
|
|
# This playbook can be run using the following command line;
|
|
#
|
|
# ansible-playbook -i <inventory file> -e "username=<username>" microk8s.yml
|
|
#
|
|
# ie,
|
|
# ansible-playbook -i ex-inv_microk8s.yml -e "username=someuser" microk8s.yml
|
|
#
|
|
###########################################################################
|
|
|
|
- hosts: all
|
|
gather_facts: true
|
|
remote_user: root
|
|
|
|
roles:
|
|
- role: update_cache
|
|
- role: microk8s
|
|
vars:
|
|
# Calculate the number of target hosts
|
|
numhosts: "{{ groups['all'] | length }}"
|
|
# Set the following variable as required
|
|
# ie,
|
|
# username: someuser
|
|
#
|
|
# Default is to apply the playbook against the root user
|
|
username: "root"
|
|
|
|
# EOF
|