Skip to content

Instantly share code, notes, and snippets.

@agaffney
Last active November 9, 2022 18:49
Show Gist options
  • Save agaffney/0429ccc3dce6fbc5cf91ae3851b8a81c to your computer and use it in GitHub Desktop.
Save agaffney/0429ccc3dce6fbc5cf91ae3851b8a81c to your computer and use it in GitHub Desktop.
Include per-host list of roles
tasks:
- include_role:
name: '{{ host_role.name | default(host_role) }}'
tasks_from: '{{ host_role.tasks_from | default("main") }}'
apply:
tags:
- '{{ host_role.name | default(host_role) }}'
loop: '{{ host_roles }}'
loop_control:
loop_var: host_role
tags:
- always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment