infrastructr.rancher_cluster
Ansible Role: Rancher Cluster
An Ansible Role that manages setup and configuration of Rancher clusters.
Role Variables
Available variables listed below, along with default values (see defaults/main.yml):
rancher_cluster_base_group: paas
Inventory group for all Rancher hosts.
rancher_cluster_master_group: paas_master
Inventory group for the Rancher master hosts.
rancher_clusters:
- name: cluster1
group: cluster1
network_provider: weave
Clusters to create with corresponding configuration and related groups.
rancher_cluster_master_host: "{{ hostvars[groups[rancher_cluster_master_group][0]]['ansible_host'] }}"
Rancher API host.
rancher_cluster_master_url: "https://{{ rancher_cluster_master_host }}"
Rancher API URL.
rancher_cluster_validate_certs: no
Enable/disable SSL certificate validation when communicating with the Rancher API.
rancher_cluster_network_provider_default: weave
Default network provider.
Dependencies
None.
Example Playbook
- hosts: all
vars:
pip_package: python3-pip
pip_install_packages:
- name: docker
roles:
- geerlingguy.pip
- geerlingguy.docker
- hosts: paas_master
roles:
- infrastructr.rancher_master
- infrastructr.rancher_cluster
Development
Use docker-molecule following the instructions to run Molecule or install Molecule locally (not recommended, version conflicts might appear).
Provide Hetzner Cloud token:
export HCLOUD_TOKEN=123abc456efg
Use following to run tests:
molecule test --all
Maintainers
License
See the LICENSE.md file for details.
Author Information
This role was created in 2020 by infrastructr team.
ansible-galaxy install infrastructr.rancher_cluster