Skip to content

metal-stack/ansible-common

Repository files navigation

Ansible Common

This repository contains shared roles, modules and plugins for metal-stack.

Modules

Module Name Description Requirements
setup_yaml Setup plugin that resolves variables from a remote YAML file

Roles

Role Name Description
docker-over-tcp Exposes the Docker socket via TCP
gcp-auth Authenticates at Google Cloud
gcp-create Creates a Kubernetes cluster at Google Cloud
gcp-destroy Destroys a Kubernetes cluster at Google Cloud
group-k8s Dynamically creates groups called k8s-masters and k8s-workers from vars defined master_nodes and worker_nodes
helm-chart Deploys a helm chart to a k8s cluster
systemd-docker-service Renders a systemd unit file that runs an application within a docker container
systemd-docker-service-cleanup Stops a systemd unit and deletes its service definition

Filter Plugins

Plugin Name Requirements Description
humanfriendly humanfriendly Converts sizes into human-friendly formats
transpile_ignition_config ct Transforming a human-friendly Container Linux Config into a JSON file
metal_lb_config Generates the config map for metal-lb
shoot_admin_kubeconfig Generates a kubeconfig for a namespace and shoot name.

Usage

It's convenient to use ansible-galaxy in order to use this project. For your project, set up a requirements.yml:

- src: https://github.com/metal-stack/ansible-common.git
  name: ansible-common
  version: v0.6.1

You can then download the roles with the following command:

ansible-galaxy install -r requirements.yml

Then reference the roles in your playbooks like this:

- name: Deploy something
  hosts: localhost
  connection: local
  gather_facts: no
  roles:
    - name: ansible-common/roles/helm-chart
      vars:
        ...