infrastructr.rancher_master
Ansible Role: Rancher Master
This Ansible Role helps you set up and configure a Rancher master.
Role Variables
Here are the available variables with their default values (check the defaults/main.yml
file for more):
rancher_master_group: paas_master
This is the inventory group for Rancher master hosts.rancher_master_base_group: paas
This is the inventory group for all Rancher hosts.rancher_master_version: v2.4.5
Version of the Rancher server.rancher_master_host: "{{ hostvars[groups[rancher_master_group][0]]['ansible_host'] }}"
The host for the Rancher API.rancher_master_url: "https://{{ rancher_master_host }}"
The URL for the Rancher API.rancher_master_admin_password: secret
The password for the Rancher admin.rancher_master_admin_password_default: admin
The default initial password for Rancher admin, which can be changed.rancher_master_validate_certs: no
This enables or disables SSL certificate validation when connecting to the Rancher API.rancher_master_ssl: generated-selfsigned
This sets the SSL certificate mode for the Rancher server. The default is an automatically generated self-signed certificate. Usegenerated-letsencrypt
for a Let's Encrypt certificate.rancher_master_retries: 10
The number of retry attempts for long-running tasks.rancher_master_delay: 30
The delay in seconds between retries for long-running tasks.rancher_master_volume: paas_master_volume # or /opt/rancher
This is the volume for persistent data, which can be a named volume or a path on the host.
Dependencies
There are no dependencies.
Example Playbook
- hosts: all
vars:
pip_package: python3-pip
pip_install_packages:
- name: docker
roles:
- geerlingguy.pip
- geerlingguy.docker
- infrastructr.rancher_master
Development
To test, use docker-molecule according to the instructions or install Molecule locally (this isn't recommended due to potential version conflicts).
Set your Hetzner Cloud token:
export HCLOUD_TOKEN=123abc456efg
Run tests using:
molecule test --all
Maintainers
License
Refer to the LICENSE.md file for details.
Author Information
This role was created in 2020 by the infrastructr team.
An Ansible Role that manages setup and configuration of Rancher master.
ansible-galaxy install infrastructr.rancher_master