Your First Productive Polycrate Workspace: A Checklist for Getting Started
TL;DR A well-named, clearly structured Polycrate workspace is half the battle: a consistent name …
Diese Serie zeigt Schritt für Schritt, wie Ansible mit Polycrate zu einer strukturierten, teilbaren und compliance-fähigen Automatisierungsplattform wird – von den Grundlagen bis zu Enterprise-Szenarien.
Ansible has been a de facto standard for automation for years – from Linux servers to Windows hosts to network components and IoT. Polycrate picks up exactly there: It doesn’t replace Ansible but structures and operationalizes it.
A rough classification:
| Topic | Plain Ansible | Polycrate (with Ansible) |
|---|---|---|
| Installation | ansible via OS package, pip, virtualenv | No local Ansible needed, runs in container, reproducible toolchain |
| Sharing | Git repos, roles, Galaxy | Versioned blocks in OCI registry, shareable via PolyHub and own registries |
| Structure | Free: Playbooks, roles, directory conventions | Block/Action/Workspace model with clear guardrails against playbook sprawl |
| Secrets | Ansible Vault, external tools | Built-in workspace encryption with age, no separate vault stack needed |
| Configuration | Variable files, group_vars, host_vars | Deep-merge of workspace.poly, block config, and action-specific variables |
| Usability | ansible / ansible-playbook CLIs | Simple polycrate run BLOCK ACTION commands, good UX even for less technical users |
| Ecosystem | Ansible Galaxy roles | PolyHub blocks (+ Galaxy still usable within blocks) |
In essence: Ansible is the engine, Polycrate is the operations framework around it.
polycrate runMany teams start like this:
sudo apt-get install ansible
# or
python3 -m venv .venv
source .venv/bin/activate
pip install ansible==9.5.1
pip install -r requirements.txtThis includes:
azure.azcollection, community.general),ansible.cfg, SSH setups, PATH issues per workstation.At the team level, this means:
pip install from the internet.With Polycrate, Ansible always runs in a container. Locally, you only need Polycrate and a container runtime (Docker, Podman):
polycrate run linux-patch patchWhat happens here:
kubectl, helm, etc.).pip install on the workstation, no Python version conflicts, no manual setup.This solves the classic dependency problem:
Details on integration can be found in the Ansible Integration in Polycrate and the Best Practices.
The standard is:
README.md”).If you want to use a playbook from another team, you must:
ansible.cfg,This works but becomes confusing as the organization grows.
In Polycrate, you package automation into blocks. Each block is:
cargo.ayedo.cloud or own registry),workspace.poly.An example of a local block blocks/linux-patch/block.poly:
name: linux-patch
version: 0.1.0
kind: generic
config:
target_hosts: all
maintenance_window: "sunday-2200"
actions:
- name: patch
description: "Performs a dist-upgrade on Linux servers"
playbook: patch.ymlExcerpt from workspace.poly that instantiates the block:
name: acme-corp-automation
organization: acme
blocks:
- name: linux-patch
from: linux-patch
config:
target_hosts: all
maintenance_window: "sunday-2200"Another workspace – perhaps from another team – could reference the same block via a registry:
name: acme-ops
organization: acme
blocks:
- name: linux-patch-prod
from: cargo.ayedo.cloud/acme/linux/linux-patch:0.1.0
config:
target_hosts: prod-linux
maintenance_window: "saturday-2300"With polycrate run linux-patch-prod patch, they use your automation without:
ansible.cfg,This is “Sharable Automation”: What you build, others can use immediately – versioned and reproducible. More on this in the PolyHub Documentation and directly in PolyHub at hub.polycrate.io.
Ansible Vault is proven but cumbersome to handle:
From a compliance perspective (e.g., in the context of GDPR, which came into effect on May 25, 2018), you ask questions like:
Polycrate takes a different approach: The entire workspace (or selected parts, especially artifacts/secrets/) can be encrypted with age. You don’t need a separate vault service.
Typical procedure:
# Initialize workspace (if not already done)
polycrate workspace init
# Add secrets, e.g., SSH keys, API tokens
mkdir -p artifacts/secrets
echo "super-secret-password" > artifacts/secrets/db-password.txt
# Encrypt workspace
polycrate workspace encryptPolycrate ensures that:
Advantages over Vault:
Details can be found in the documentation on Workspace Encryption.
With Ansible, you can choose your structure completely freely:
playbooks/, roles/, group_vars/, host_vars/, inventories/ …In small teams, this is often okay. In larger environments, it quickly becomes chaotic:
Polycrate provides you with a clear framework:
workspace.poly), central configuration, inventories, secrets.patch, dry-run, rollback).This framework prevents playbook sprawl and creates guardrails. Each action is called exactly like this:
polycrate run linux-patch patchNo long ansible-playbook commands with numerous parameters – easily understandable even for colleagues who don’t write Ansible daily.
Plain Ansible Playbook patch.yml:
- name: Patch Linux systems
hosts: all
become: true
tasks:
- name: Update package list
ansible.builtin.apt:
update_cache: yes
- name: Perform dist-upgrade
ansible.builtin.apt:
upgrade: dist
autoremove: yes
autoclean: yesInventory as YAML (inventory.yml):
all:
hosts:
server01.acme-corp.com:
ansible_user: ubuntu
server02.acme-corp.com:
ansible_user: ubuntuCall with plain Ansible:
ANSIBLE_INVENTORY=inventory.yml ansible-playbook patch.ymlNow the same with Polycrate. We use the same content from patch.yml, but parameterize hosts:
- name: Patch Linux systems (Polycrate)
hosts: "{{ block.config.target_hosts }}"
become: true
tasks:
- name: Update package list
ansible.builtin.apt:
update_cache: yes
- name: Perform dist-upgrade
ansible.builtin.apt:
upgrade: dist
autoremove: yes
autoclean: yesOur block blocks/linux-patch/block.poly:
name: linux-patch
version: 0.1.0
kind: generic
config:
target_hosts: all
maintenance_window: "sunday-2200"
actions:
- name: patch
description: "Performs a dist-upgrade on the defined hosts"
playbook: patch.ymlAnd workspace.poly in the root directory:
name: acme-corp-automation
organization: acme
config:
environment: "prod"
blocks:
- name: linux-patch
from: linux-patch
config:
target_hosts: all
maintenance_window: "sunday-2200"Call:
polycrate run linux-patch patchKey points:
inventory.yml) is in the workspace root – Polycrate automatically sets ANSIBLE_INVENTORY.block.config.* come from workspace.poly and are “deep-merged” with the block config. You have a central configuration model instead of scattered group_vars and host_vars.More on workspace and block structure: Workspaces, Blocks, and Actions.
With plain Ansible you often see:
vars/, group_vars/, host_vars/,-e on the CLI.That is flexible, but:
Polycrate adds:
workspace.config for global defaults,block.config per block instance,That lets you separate environments cleanly:
workspace.config.environment = "prod" vs. "dev",target_hosts per block instance,You keep Ansible’s strengths (idempotency, large module ecosystem) and gain a clear configuration model at workspace level.
Ansible Galaxy is a huge pool of roles and collections. Many can be used directly inside Polycrate blocks:
collections: in requirements.yml,roles: in your playbooks.Polycrate extends this with:
You combine Galaxy’s breadth with Polycrate’s structured block model and sharing story.
Polycrate is not a silver bullet. Plain Ansible is often enough—or better—when:
Important: Polycrate builds on Ansible. You do not have to “switch” wholesale—you can:
Yes. Polycrate runs Ansible in a container. You can:
block.poly that points to it,workspace.poly,polycrate run BLOCK ACTION.Migration effort depends on how tidy your current layout is. Often you only need to parameterize hosts (e.g. hosts: "{{ block.config.target_hosts }}") and move inventory/variables into the workspace model. See Ansible integration in Polycrate.
You do not need Kubernetes skills, but basic container literacy helps. Polycrate uses containers for a reproducible Ansible toolchain. For typical Linux/Windows/AD/IoT scenarios you do not build images yourself—you use the standard toolchain or one provided by your organization. If you already do Platform Engineering, Polycrate fits well with container and GitOps workflows.
No. Larger orgs feel dependency chaos, sharing, compliance, and multi-team issues most—but smaller teams also gain from easier onboarding, clear block boundaries, and built-in workspace encryption without an extra vault stack.
If your Ansible footprint is growing and getting messy, Polycrate is worth a look before sprawl hardens.
More questions: FAQ.
Plain Ansible and Polycrate are not opposites—they are two layers of the same idea: scriptable, declarative infrastructure. Ansible is the engine; Polycrate handles the operational pain: dependencies, sharing, structure, secrets, reuse.
In this article you saw:
At ayedo we support teams from first Polycrate experiments to full Platform Engineering setups where Ansible, Polycrate, monitoring, security, and compliance work together. Whether you optimize Ansible first or later build a full Polycrate-based automation platform, the next steps should stay pragmatic, traceable, and workable for your team.
If you want to feel how polycrate run compares to ansible-playbook in daily use, now is a good time to try it.
Overview and registration: Workshops.
TL;DR A well-named, clearly structured Polycrate workspace is half the battle: a consistent name …
TL;DR Most environments are hybrid: Windows servers for AD, file services, and specialized …
TL;DR Set up WinRM properly once with HTTPS, certificate, and firewall rules, and you’ll have …