Runtime Tags
konfigadm minify -c config.yml --tags ubuntu
# tags are detected by default when using the apply command
konfigadm apply -c config
Similar to go build tags, runtime tags provide a way of deciding what gets run, the following tags are provided by default:
centosubuntufedoradebianmatched for all debian based distros (ubuntu)rhelredhatmatched for all redhat based distros (centos, fedora, rhel, amazon linux)amazonLinuxawsmatched when running inside Amazon Web Servicesazurematched when running inside Azurevmwarematched when running on a vSphere Hypervisorkvmmatched when running on a KVM Hypervisor
Tags can be applied to the following elements: * packages * packageRepos * packageKeys * commands, pre_commands, post_commands
Multiple tags can be specified in which case all tags must match.
packages:
# only install aws-cli on debian based system running in AWS
- aws-cli #+debian +aws
Tags can be negated using !
pre_commands:
# attach a rhel subscription, but only if we are not running in AWS
- subscription manager attach #+rhel !aws